How Mathematics Makes Computer Animation Possible
Toy Story (1995), the first fully computer-animated feature film, contains more than 110,000 frames. Its rendering reportedly took around 800,000 machine-hours. But animators didn't pose characters in every one of those frames. They set key poses, and mathematics generated everything in between.
Computer animation is mostly the art of interpolation: taking a few points you care about and filling in a smooth, believable path between them.
Straight Lines Look Wrong
The simplest way to move an object from A to B is at constant speed along a straight line. Mathematically it's perfect. On screen it looks robotic.
Real objects accelerate and decelerate. A ball thrown in the air slows as it rises. A hand reaching for a cup speeds up, then eases in. Good animation needs curves in time as well as in space, and that takes more math than a straight line.
Step 1: Linear Interpolation
Everything starts with lerp:
lerp(A, B, t) = A + (B − A) × t, 0 ≤ t ≤ 1
At t = 0 you're at A, at t = 1 you're at B, and at t = 0.5 you're halfway. With a keyframe at frame 0 (x = 0) and another at frame 24 (x = 120), the position at frame 6 is:
t = 6 / 24 = 0.25 → x = 0 + 120 × 0.25 = 30
Lerp works for positions, colors, sizes, anything numeric. On its own, though, it creates sudden starts, stops and sharp corners at every keyframe.
Step 2: Easing Functions
To make motion feel natural, animators remap t before interpolating. A classic "ease in-out" is the smoothstep function:
s(t) = 3t² − 2t³
Its slope is zero at t = 0 and t = 1, so motion starts and ends gently. It's a cubic polynomial, and its derivative s′(t) = 6t − 6t² gives the speed, peaking at t = 0.5.
Another natural choice is a cosine-based ease:
s(t) = (1 − cos(πt)) / 2
It traces half a cosine wave, the same smooth motion as a point on a rotating wheel seen from the side. Explore the shape with the cosine calculator.
Step 3: Splines Through Many Keyframes
With many keyframes, you want one smooth curve passing through all of them. That's a spline, built from polynomial pieces joined smoothly.
A popular choice is the Catmull–Rom spline, published in 1974 by Edwin Catmull and Raphael Rom. It passes through every key point, and the tangent at each point is set by its neighbors:
tangentᵢ = (Pᵢ₊₁ − Pᵢ₋₁) / 2
Between neighboring points, the curve is a cubic polynomial that matches both positions and tangents. The result is continuous in position and velocity, with no visible corners.
Catmull went on to co-found Pixar and received the 2019 Turing Award (shared with Pat Hanrahan) for contributions to 3D computer graphics.
Step 4: Skeletons and Forward Kinematics
Characters are animated with a hierarchy of bones. Rotating a shoulder moves the elbow, wrist and fingers with it. Each bone's world position is the product of all the transformation matrices above it in the chain:
World(hand) = M(shoulder) × M(elbow) × M(wrist) × local position
That's forward kinematics: set the joint angles, compute where the hand ends up. Try chaining transformations with the matrix multiplication calculator.
Step 5: Inverse Kinematics
Animators often want the opposite: "put the hand on the door handle, and work out the joint angles." That's inverse kinematics (IK).
For a two-bone arm with upper arm length a, forearm length b and a target at distance d from the shoulder, the law of cosines gives the elbow angle directly:
d² = a² + b² − 2ab·cos(θ)
θ = arccos((a² + b² − d²) / (2ab))
For longer chains, animation software uses iterative methods that nudge each joint toward the target. Solve the two-bone version yourself with the right triangle calculator and the arc cosine calculator.
Step 6: Skinning
Bones are invisible. The visible skin is a mesh of vertices. Each vertex is attached to one or more bones with weights that add up to 1, and its final position is a weighted average of where each bone would move it:
v′ = Σ wᵢ × Mᵢ × v, Σ wᵢ = 1
That's called linear blend skinning. Vertices near an elbow are influenced by both upper arm and forearm, so the skin bends smoothly instead of tearing.
An Insider Reference: Perlin Noise
Perfectly smooth math looks fake too. Real surfaces, flames and clouds have organic irregularity. In 1983, after working on the film Tron (1982), Ken Perlin developed Perlin noise, a way of generating smooth, natural-looking randomness by interpolating random gradients on a grid.
It became so widely used in visual effects that Perlin received an Academy Award for Technical Achievement in 1997. Noise functions still drive procedural textures, terrain and subtle motion in characters.
Two Concepts Worth Knowing
Parametric Curves
A parametric curve gives x and y (and z) as functions of a parameter t. Animation paths, splines and many famous shapes are parametric. See the cycloid and hypotrochoid for beautiful interactive examples.
Continuity
C⁰ continuity means a curve has no gaps. C¹ means no sudden changes in velocity. C² means no sudden changes in acceleration. The higher the continuity, the smoother the motion feels.
Quick Answer: How Is Math Used in Computer Animation?
Computer animation uses interpolation to fill frames between keyframes, easing functions and splines for smooth motion, matrix transformations for skeletons, trigonometry and inverse kinematics to position limbs, weighted averages for skin deformation, and noise functions for natural variation.
Try Them Yourself
- Cycloid: a parametric path traced by a rolling wheel
- Hypotrochoid: spirograph-style motion from nested circles
- Lissajous Curve: motion from two sine waves
- Cosine Calculator: build your own easing curve
- Arc Cosine Calculator: solve inverse kinematics angles
- Matrix Multiplication Calculator: chain bone transforms
Pick two points, apply lerp with t going 0, 0.25, 0.5, 0.75, 1, then repeat with smoothstep. Plot both. That little difference is the secret of good animation.