Maths is used to create many of the special effects that modern films rely on so much. As an example, the Lord of the Rings trilogy used 263 special effects artists, all of whom used a vast amount of maths to do their work.
Making the image
A character such as Shrek is described mathematically as a collection of points, curves and surfaces, stored inside a computer. These points are moved around to give the impression of a living and breathing ogre, interacting with its environment. To create the image it is common to build a model of the character. The model is then scanned with a laser, and the coordinates of the points on its surface are stored in the computer. To do this, the points are joined up using mathematics to form wire skeletons, which are made up from simple polygons such as triangles.
Rendering and Subdivision
Whilst triangles are very useful to define the shape of the object, they do not give images which look as realistic as we might like. To produce more realistic images a second process is used to give a smoother picture. The most widely used tools in recent film production are subdivision algorithms, which are used iteratively to add more points to an image to give a smoother looking picture.
Lighting it Up
We see images by the light which is reflected from them. Different surfaces reflect light in different ways, and light from these objects can reach our eyes from many different directions. This complex process must be reproduced accurately if our objects are going to look realistic. The procedure for doing this is called rendering and it takes up a great deal of computer time and energy. In one production of a James Bond movie, the rendering process took so much computer power that it led to a power cut in the London district of Soho where the movie was being produced.

The usual method used to do rendering is called ray tracing, in which a very large number of computer generated light rays are artificially shone onto the object. The light rays are assumed to be straight lines, which reflect off the object in different ways depending upon its orientation and material. The process of ray tracing starts by identifying the viewpoint of the supposed movie goer. Starting from this point, rays are traced backwards towards the object and reflected off it with different strengths depending upon the nature of the material.
The angle at which it is reflected is then calculated. If this reflected ray intersects a light source, the triangle is shaded in with a bright colour so that it appears lit up by the light source. This process is then repeated for a million or so different rays.
Adding effects
Most modern movies make a huge use of special effects, including the movement of smoke, fire, and water. In the past, animators would use their best judgement about how to make such effects look realistic, whereas they can now accurately recreate the underlying physics of the situation. To do this they take the laws of physics which describe what is happening, and represent them by using equations. Solving these equations is far from easy and requires sophisticated mathematical ideas and computer algorithms, drawn mainly from the fields of numerical analysis and scientific computing.
Capturing the spirit
The animation effects described above are really only part of the story. Whilst mathematics can create and move characters around, how can they be given spirit, so that they look, and behave like real people? A lot of modern films do this by using a combination of computer graphics and real life actors using the technique of ‘performance/motion capture’. In motion capture the actor wears a suit covered with many reflecting dots. As the actor moves, several cameras capture the motion of the dots in three dimensions using geometry. These points are stored in the computer and then joined to make a wire frame image, which can move around in exactly the same way as the original actor.
To complete the image, the wire frame model is triangulated and rendered to build up a realistic looking body. A particularly challenging aspect of this is to produce a realistic face which can reproduce the actual expressions of the actor. This is achieved by having a reference face, which is then wrapped around the dots on the actor’s face using a carefully designed mathematical optimisation algorithm.
The Future
The head of research at Pixar was recently asked: ‘What advice would you give someone who wanted to use math to make movies?’
His response was: ‘Learn as much mathematics as you can, particularly applied math. The areas of mathematics we use most heavily today are Euclidean and affine geometry, trigonometry, linear algebra, calculus and numerical analysis. We don’t really know what the mathematical tools of tomorrow might be, so we’re counting on the next generation of employees to tell us.’
This quote underlines the fact that the mathematics behind the movies is undoubtedly one of the most dynamic and growing applications of modern mathematics, with many exciting possibilities for the future.
Technical Supplement – A Matter of Proportion
All movies have small and large things, which may be people or objects. Some are very large indeed, such as the dinosaurs in the movie Jurassic Park, or they may be small, such as the Hobbits in the Lord of the Rings. Surprisingly all of the actors who played Hobbits were of average height. This was done, in the main, by using the relatively simple technique of forced perspective.
This works from the simple basis that a small object close to the camera will look as large as a bigger object further away from the camera. More precisely, if an object is of height and it is a distance
from the camera then the angle
it makes (in radians) is close (if
is large enough) to the ratio
. If
is small then the object will appear smaller to the viewer. This can be achieved either by making
smaller or by making
larger. So, to make a ‘Hobbit’ appear to be small, an actor of normal height has to be placed further away from the camera, than an actor playing a larger character such as a wizard.
Of course this has to be done very carefully to make sure that the characters all appear to have consistent sizes. If they are moving then the camera has to move with them to keep the same perspective. All of this requires quite careful mathematics and a team of people armed with rulers and tape measures on the set.
Expert
Professor Chris Budd OBE, University of Bath, and Gresham Professor of Geometry
References
- J. Lasenby, Maths goes to the movies, Plus Maths, March 2007.
https://plus.maths.org/content/maths-goes-movies-0 - T. Whitted, An improved illumination model for shaded display, Communications of the ACM, 23, (1980).
- http://blog.ted.com/the-math-behindthe-movies-an-interview-with-tony-deroseof-pixar
- See the Bath Camera website at https://www.camera.ac.uk/
- E. Catmull, and J. Clark, “Recursively generated B-spline surfaces on arbitrary topological meshes”, Computer-Aided Design. 10
- (1978), 350. doi:10.1016/0010-4485(78)90110-0
Image Credits
Romainbehar, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=25791172
Mimigu at English Wikipedia, CC BY 3.0, https://commons.wikimedia.org/w/index.php?curid=19828149
The IMA would like to thank Professor Chris Budd OBE University of Bath and Gresham Professor of Geometry, for his help in the preparation of this document.



