Application of Mathematics in Real-World Usage · Guide 34 · BTT Mathematics Hub
A computer screen is flat, but it can display a convincing three-dimensional world. The bridge is Mathematics: points become vectors, camera movement becomes matrix multiplication, perspective becomes division by depth, surfaces become triangles, and smooth colour or shape is reconstructed through interpolation.
This guide uses idealised graphics pipelines and fictional coordinates for Mathematics teaching. It is not a software-engine implementation specification. Real renderers include numerical precision, clipping conventions, colour management, shading models, acceleration structures and hardware-specific details beyond these examples.
A 3D point is represented by coordinates in a frame
A point p=(2,3,6) describes position relative to a chosen origin and axes. Its distance from the origin is √(2²+3²+6²)=7.
Like robotics, graphics must keep track of frames: object, world, camera and screen coordinates can represent the same physical point differently.
Vector addition translates points
Adding translation t=(4,−1,2) to p=(2,3,6) gives(6,2,8). The displacement changes position without changing the object’s internal geometry.
Scaling multiplies coordinates relative to an origin
A scale matrix diag(2,3,1) maps(1,2,4) to(2,6,4). Non-uniform scaling changes lengths differently by axis and can change angles.
Rotation is matrix multiplication
In two dimensions, rotating point(3,0) by90° about the origin gives(0,3). In three dimensions, rotations are represented by 3×3 matrices and depend on the chosen axis and convention.
Homogeneous coordinates unify affine transforms
By writing a 3D point as[x,y,z,1]ᵀ, a 4×4 matrix can combine rotation, scale and translation. Direction vectors can be represented with final coordinate0 so translation does not affect them.
This distinction is useful: a surface normal is a direction, while a vertex is a position.
Transform order changes the result
Scale point(1,0) by2 then translate by(3,0) to obtain(5,0). Translate first to(4,0) then scale by2 to obtain(8,0).
Graphics transformation stacks therefore need a precise multiplication order.
Camera coordinates place the viewer at a convenient origin
A view transform typically converts world coordinates so the camera becomes the reference frame. Once that happens, projection can be expressed relative to camera depth rather than arbitrary world position.
Perspective projection divides by depth
In a simple pinhole model with focal scale f, projected coordinates can be x′=fx/z and y′=fy/z for z>0.
For point(2,1,4) with f=2, projection is(1,0.5). Move the same x and y to z=8 and the projection becomes(0.5,0.25): greater depth makes the image smaller.
Perspective is not an affine transformation
The division by z makes perspective nonlinear in ordinary Cartesian coordinates. Homogeneous projective coordinates make the operation easier to organise before the final divide.
Viewport mapping converts normalised coordinates to pixels
If a normalised horizontal coordinate u ranges from0 to1 across an 800-pixel image, an ideal mapping x=800u places u=0.25 at x=200 under the chosen edge convention.
Exact pixel-centre conventions vary by API, so implementation code must follow the graphics system’s definition.
Triangles are fundamental because three points define a plane
For 2D vertices A=(0,0), B=(4,0), C=(0,3), triangle area is½×4×3=6.
In 3D, area can be computed as½‖(B−A)×(C−A)‖.
Barycentric coordinates interpolate across a triangle
A point inside triangle ABC can be written P=αA+βB+γC with α+β+γ=1 and nonnegative weights for an interior point.
If α=0.2,β=0.3,γ=0.5 and A=(0,0),B=(4,0),C=(0,3), then P=(1.2,1.5).
Linear interpolation blends between two values
Linear interpolation is lerp(a,b,t)=(1−t)a+tb. Between10 and30 at t=0.25, the result is15.
The same formula can interpolate positions, colours, texture coordinates or other quantities when linear interpolation is appropriate.
Bilinear interpolation performs two linear interpolations per axis
Take corner values q00=0,q10=10,q01=20,q11=30. At u=v=0.5, the bilinear result is15.
Bilinear interpolation is common when sampling an image or texture between stored pixels.
Quadratic Bézier curves use Bernstein weights
A quadratic Bézier curve is B(t)=(1−t)²P0+2(1−t)tP1+t²P2.
With P0=(0,0),P1=(2,4),P2=(4,0), at t=0.5 the weights are0.25,0.5,0.25 and B=(2,2).
Rasterisation asks which pixels a primitive covers
A continuous triangle must be converted to a discrete set of pixel samples. Coverage rules determine which samples are inside or on an edge.
Rasterisation therefore connects continuous geometry to a discrete grid, introducing sampling issues similar to signal processing.
The depth buffer keeps the nearest visible surface per sample
If two fragments reach the same pixel with comparable depth values3 and5 under a “smaller is nearer” convention, the depth3 fragment is retained.
Depth-buffer precision and projection can create numerical artefacts when surfaces are extremely close.
Diffuse lighting uses a dot product in a simple model
Lambertian diffuse intensity is proportional to max(0,n·l) for unit surface normal n and unit light direction l.
If n=(0,0,1) and l=(0,0.6,0.8), then n·l=0.8, so the surface receives80% of the maximum diffuse term in this ideal model.
Normals require special handling under non-uniform scale
Transforming a normal with the same matrix as a point can destroy perpendicularity under non-uniform scaling. The standard linear-algebra correction uses the inverse-transpose of the model’s linear transform.
This is a good example of mathematical type checking: a normal is not just another position vector.
Bounding boxes provide cheap geometric tests
Points(1,4),(3,−2),(5,1) have axis-aligned bounding box xmin=1,xmax=5,ymin=−2,ymax=4.
Bounding boxes are often tested before more expensive geometry because they can quickly reject impossible intersections.
A complete graphics calculation preserves the coordinate pipeline
State object coordinates, model transform, world/view transform, projection convention, viewport, interpolation method and depth/coverage rule.
The return path is model geometry → transforms → camera → projection → sampling → shading → pixels.
Practice: twenty computer-graphics Mathematics questions
- Find norm of vector(2,3,6).
- Add translation(4,−1,2) to point(2,3,6).
- Apply scale diag(2,3,1) to(1,2,4).
- Rotate(3,0) by90° in2D.
- Scale(1,0) by2 then translate by(3,0).
- Translate first then scale; compare with question5.
- Project(2,1,4) with f=2.
- Project(2,1,8) with f=2.
- Map u=.25 to an ideal800-unit viewport using x=800u.
- Find area of triangle(0,0),(4,0),(0,3).
- With barycentric weights.2,.3,.5 on those vertices, find P.
- lerp(10,30,.25).
- Find bilinear midpoint of corner values0,10,20,30.
- For Bézier control points(0,0),(2,4),(4,0), find B(.5).
- At one pixel, depths are3 and5 with smaller-nearer convention. Which survives?
- Find dot product of n=(0,0,1) and l=(0,.6,.8).
- Find AABB of points(1,4),(3,−2),(5,1).
- Why does perspective make distant objects appear smaller?
- Why is transform order important?
- Why should a normal under non-uniform scale not be transformed exactly like a position?
Worked answers
- 7.
- (6,2,8).
- (2,6,4).
- (0,3).
- (5,0).
- (8,0); different because the operations do not commute.
- (1,0.5).
- (0.5,0.25).
- 200.
- 6.
- (1.2,1.5).
- 15.
- 15.
- (2,2).
- Depth3.
- 0.8.
- x:[1,5], y:[−2,4].
- Because the projected coordinates are divided by depth z in the pinhole model.
- Because matrix composition is generally non-commutative.
- Because the normal must remain perpendicular to transformed tangent directions; inverse-transpose preserves that relationship.
Sources and connected applications
For curves, coordinates, transformations, modelling, colour and rendering foundations, see MIT OpenCourseWare: Computer Graphics Lecture Notes. The coordinates, shapes and lighting examples on this page are original teaching constructions.
Continue with Robotics, Kinematics, Coordinate Transforms and Path Planning; Timekeeping, Clocks, Calendars, Drift and Modular Arithmetic; and Supply Chains, Logistics, Network Flow, Routing and Warehouses. Return to the BTT Mathematics Hub.

