Creating a virtual world first requires us to represent shapes, along with their appearance and movement. We must then simulate light's journey to the eye via the objects it illuminates in the scene. And all this calls for… mathematics (as well as physics, computer science and sometimes a little biology).
Modeling shapes ------------------
You have probably seen images of meshes: an object's surface can be represented as an enormous irregular polyhedron made up of triangular or quadrilateral facets. To achieve a smooth appearance, however, hundreds of thousands of tiny facets would be needed, consuming a great deal of memory. Ideally, we would even adjust their number according to the object's distance from the screen. Moreover, artists would rather model objects using elements that are larger and more flexible than polygonal facets: we need curved elements. How can this be done?
The 2D analogue of a mesh is a piecewise-affine function. Curves, meanwhile, can be described by functions such as polynomials. To draw a curve through key points (as in vector graphics software such as Inkscape or Illustrator), we use piecewise polynomials chosen to join with matching slopes. Four constraints—two values and two slopes—require a cubic polynomial, called a spline function (see les Algorithmes, Bibliothèque Tangente 37, 2013).