Steven Wittens: Making things with maths
Steven Wittens (@unconed) was speaking at Full Frontal about how maths are an essential part of computer engineering, these are my notes from his talk.
Sandboxes are important, need a place to play around like lego. Grapher.app is a great sandbox and comes free with MacOS. GLSL sandbox and Ptocessing.js are good sandboxes.
Everything in maths is a choice - use the sandbox to experiment with what your choices result in.
Bezier curve (pen tool from vector graphics). They could be be constucted on pen and paper. Paul de Casteljau working at Citroen formulated the maths - Bezier at Renault refined them.
Vectors are a distance and direction, they are relative - you can do vector maths, addition, subtraction, multiplication, division.
Linear interpolation is common and important and not that difficult. This is the primitive of bezier curves. Sychronise two linear interpolation for a quadratic bezier curve. Add another interpolation and the third level of interpolation is the classic cubic bezier curve from drawing progams.
Can also be done in 3D by supplying 3D cordinates for vectors. Connection several and you can define a surface of liner interpolations.
Automate generation of maps, textures, objects using code. Very vague field: You throw together a bunch of random shit.
Every operation you make to your base
f(x) = x shifts the graph. Things like sin, cos and tan are good ways to modify the graph. Min, max can limit a section of a curve - window function, like a brush.
This behaves in a real way if you have a real physics engine. Easy to make - hard to make a good one.
Basic physics engine has two elements: position and velocity. From this we can calculate where something will be in the future. With small enough timescales you have continuous motion. Acceleration is another vector which we can add (e.g. gravity) - Euler integration. This is now a physics engine.
Using Hook's law on springs we get sin waves as an emergent property.
Vertlet integration is a better approximation for common simple physics engines. See also Zeno's paradox.