- Asked 3/25
- 2074 Chaitra · 6 marks
- 2075 Chaitra · 4 marks
- 2076 Chaitra · 5 marks
Derive perspective projection matrix
Short answer
Perspective projection maps a point P(x,y,z) to P'(xp,yp,zvp) on the view plane using xp = x·dp/(zprp−z), yp = y·dp/(zprp−z) where dp = zprp−zvp. The homogeneous matrix has row [1 0 0 0; 0 1 0 0; 0 0 -zvp/dp zvp·zprp/dp; 0 0 -1/dp zprp/dp] so that h = (zprp−z)/dp.
Derive the transformation matrix for perspective projection (derive an expression for perspective projection of a 3D point).
Setup: the centre of projection (COP) is on the z-axis at (0, 0, zprp). The view plane is z = zvp. Let dp = zprp − zvp. A point P(x, y, z) is projected to P'(xp, yp, zvp) where the line from the COP through P meets the view plane.
y
| P(x,y,z)
| /
| /
yp |--/--- view plane (z = zvp)
|/
COP ---+----------------> z
zprp
Derivation (similar triangles): along the line from the COP to P, any point is
x' = x·u, y' = y·u, z' = zprp − (zprp − z)·u, with 0 ≤ u ≤ 1
Put z' = zvp:
zvp = zprp − (zprp − z)u → u = (zprp − zvp)/(zprp − z) = dp/(zprp − z)
So
- xp = x · dp/(zprp − z) = x / ((zprp − z)/dp)
- yp = y · dp/(zprp − z)
- zp = zvp
Matrix form: use homogeneous coordinates with h = (zprp − z)/dp, so that xp = x_h/h and yp = y_h/h.
| x_h | | 1 0 0 0 | | x |
| y_h | = | 0 1 0 0 | | y |
| z_h | | 0 0 -zvp/dp zvp·zprp/dp | | z |
| h | | 0 0 -1/dp zprp/dp | | 1 |
Check: h = −z/dp + zprp/dp = (zprp − z)/dp, and z_h/h = zvp·(zprp − z)/dp ÷ ((zprp − z)/dp) = zvp.
Special cases
- View plane at z = 0 (zvp = 0): xp = x·zprp/(zprp − z), and the matrix has third row (0 0 0 0).
- COP at the origin and view plane z = d: xp = x·d/z, yp = y·d/z.
Perspective makes distant objects smaller (perspective foreshortening). Points with z = zprp are projected to infinity (h = 0).
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- 3D rotation steps and perspective projection · Computer Graphics, chapter 4
- Short note: Two-point perspective projection · Computer Graphics, chapter 4
- Need of perspective projection · Computer Graphics, chapter 4
- Derive parallel projection matrix · Computer Graphics, chapter 4 · asked 2×
- Derive oblique projection matrix · Computer Graphics, chapter 4 · asked 3×
- Perspective projection of pyramid · Computer Graphics, chapter 4 · asked 2×
- 4-point DFT by linear transformation · Signals and Systems, chapter 3
- Derive expression for tile drain spacing · Irrigation and Drainage Engineering, chapter 9 · asked 8×
- Derive development length expression · Design of RCC Structure, chapter 6 · asked 6×
- Derive PET expression by Penman's method · Engineering Hydrology, chapter 3