Unit 4: 3D graphics
Computer Graphics notes · PTU syllabus (BSIT603/BSBC602)
On this page
Unit summary
Three-dimensional graphics models solid objects and projects them onto a flat screen. This unit covers 3D geometric transformations, the mathematics of parallel and perspective projections, and an introduction to 3D viewing transformations and clipping.
After this unit you can
- Apply 3D translation, scaling and rotation
- Explain parallel projections
- Explain perspective projections
- Describe the 3D viewing pipeline and clipping
PTU syllabus topics
- 3D geometric transformations
- mathematics of parallel and perspective projections
- introduction to 3D viewing transformations and clipping
Projectors
Parallel to each other
Meet at a centre of projection
Size
Preserved regardless of distance
Distant objects look smaller
Looks
Less realistic
Realistic
Used for
Engineering drawings
Games, animation, architecture
Topic 1
3D coordinate systems and homogeneous coordinates
- Points are written (x, y, z, 1) and transformations are 4 × 4 matrices. Graphics systems use either right-handed (z towards the viewer) or left-handed coordinate systems.
Topic 2
3D geometric transformations
Translation
x′ = x + tx, y′ = y + ty, z′ = z + tz
Scaling
x′ = sx·x, y′ = sy·y, z′ = sz·z
Rotation about the z-axis
x′ = x cos θ − y sin θ; y′ = x sin θ + y cos θ; z′ = z
Rotation about the x-axis
y′ = y cos θ − z sin θ; z′ = y sin θ + z cos θ; x′ = x
Rotation about the y-axis
z′ = z cos θ − x sin θ; x′ = z sin θ + x cos θ; y′ = y
- 1
Translate the axis to pass through the origin
- 2
Rotate about x so the axis lies in the xz-plane
- 3
Rotate about y so the axis coincides with z
- 4
Rotate by θ about z
- 5
Apply the inverse rotations
- 6
Apply the inverse translation
- Reflection in 3D is about a plane (e.g., xy-plane: z′ = −z); shear shifts coordinates in proportion to another coordinate.
Topic 3
Projections
- Projection maps 3D points onto a 2D projection plane along projectors from a centre of projection.
Parallel
Projectors parallel; centre at infinity
Orthographic
Projectors perpendicular to the plane — front, top, side views; axonometric (isometric)
Oblique
Projectors at an angle — cavalier, cabinet
Perspective
Projectors meet at a centre; one-, two- and three-point perspective
Topic 4
Mathematics of parallel projection
Orthographic onto the xy-plane
x′ = x, y′ = y, z′ = 0
Oblique onto the xy-plane
x′ = x + z·L cos φ, y′ = y + z·L sin φ (L = 1 cavalier, L = ½ cabinet; φ often 30° or 45°)
- Properties: parallel lines stay parallel; true sizes preserved in orthographic views — used in engineering drawings and architecture.
- Isometric projection: an axonometric view in which all three axes are equally foreshortened (about 0.816), with axes 120° apart.
Topic 5
Mathematics of perspective projection
- With the centre of projection at the origin and the projection plane at z = d:
Projected x
xp = x·d ÷ z
Projected y
yp = y·d ÷ z
Homogeneous form
(x, y, z, z ÷ d) then divide by the fourth coordinate
Example
d = 2: point (4, 6, 8) projects to (4 × 2 ÷ 8, 6 × 2 ÷ 8) = (1, 1.5); the farther point (4, 6, 16) projects to (0.5, 0.75) — distant objects look smaller.
- Properties: foreshortening (size decreases with distance), vanishing points where parallel lines appear to meet; realistic but does not preserve true measurements.
Centre of projection
At infinity
At a finite point
Size with distance
Unchanged
Decreases
Parallel lines
Remain parallel
Converge at vanishing points
Use
Engineering drawings, CAD
Games, architecture renderings, films
Topic 6
3D viewing transformation
- 1Modelling transformation
Object to world coordinates
- 2Viewing transformation
World to camera (viewing) coordinates using view reference point, view-plane normal and view-up vector
- 3Projection transformation
Parallel or perspective to projection coordinates
- 4Normalisation and clipping
To a canonical view volume
- 5Viewport transformation
To device coordinates for display
Topic 7
3D clipping
- View volume: a rectangular box (parallelepiped) for parallel projection or a truncated pyramid (frustum) for perspective, bounded by left, right, top, bottom, near and far planes.
- 3D clipping removes parts of objects outside the view volume. Cohen–Sutherland in 3D uses 6-bit region codes (left, right, below, above, near, far); the view volume is often normalised to a unit cube so clipping planes are simple.
- Hidden-surface removal (z-buffer, back-face culling) follows clipping to show only visible surfaces.
Key terms
- 4 × 4 matrix
- Homogeneous matrix for 3D transformations
- Projection plane
- Surface onto which a 3D scene is projected
- Orthographic projection
- Parallel projection with projectors perpendicular to the plane
- Vanishing point
- Point where parallel lines appear to meet in perspective
- Frustum
- Truncated pyramid view volume for perspective viewing
Quick revision
- (x, y, z, 1); right- and left-handed systems.
- 3D translation, scaling, rotations about x, y, z; arbitrary axis.
- Parallel: orthographic, axonometric (isometric), oblique (cavalier, cabinet).
- Perspective: xp = x·d ÷ z; vanishing points.
- Viewing pipeline; view volume; frustum; 6-bit codes; hidden-surface removal.
Important exam questions
Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).
Short-answer questions
- Q1.Why are 4 × 4 matrices used in 3D graphics?
- Q2.Write the matrix equations for rotation about the z-axis.
- Q3.Distinguish orthographic and oblique projections.
- Q4.Distinguish cavalier and cabinet projections.
- Q5.What is a vanishing point?
- Q6.How many bits are in a 3D region code?
Long-answer questions
- Q1.Explain 3D transformations with matrices.
- Q2.Explain rotation about an arbitrary axis.
- Q3.Explain the mathematics of parallel and perspective projections.
- Q4.Explain the 3D viewing pipeline and 3D clipping.
Stuck on this unit?
Message SBS on WhatsApp for help with Computer Graphics, or to ask about studying B.Sc IT at Synetic.
