Skip to main content

Perspective projection of pyramid

Short answer

COP (0,0,20), view plane z=0 so dp=20. Use xp = 20x/(20−z), yp = 20y/(20−z). Base: (15,15,10)→(30,30,0); (20,20,10)→(40,40,0); (25,15,10)→(50,30,0); (20,10,10)→(40,20,0). Apex (20,15,20) has z=zprp → projection at infinity.

Obtain perspective projection co-ordinates for the pyramid with vertices of base (15, 15, 10), (20, 20, 10), (25, 15, 10), (20, 10, 10) and apex (20, 15, 20); given that Zprp = 20 and Zvp = 0.

Centre of projection at (0, 0, zprp) = (0, 0, 20), view plane z = zvp = 0, so dp = zprp − zvp = 20.

Formulas: xp = x·dp/(zprp − z), yp = y·dp/(zprp − z), zp = 0

Homogeneous matrix:

| 1 0 0     0 |
| 0 1 0     0 |
| 0 0 0     0 |
| 0 0 -1/20 1 |

with h = 1 − z/20, so (xp, yp) = (x_h/h, y_h/h).

Vertexzh = (20 − z)/20xp = x/hyp = y/hProjected
A(15,15,10)100.515/0.5 = 3030(30, 30, 0)
B(20,20,10)100.54040(40, 40, 0)
C(25,15,10)100.55030(50, 30, 0)
D(20,10,10)100.54020(40, 20, 0)
E apex(20,15,20)20020/015/0undefined

Apex: its z equals zprp, so it lies in the plane through the centre of projection that is parallel to the view plane. Its projector never meets the view plane (h = 0), so the projection is at infinity. With this data the apex cannot be projected; it would be projected normally if it were in front of the COP (z < 20) and clipped when z ≥ 20.

Answer: base projects to (30,30), (40,40), (50,30), (40,20) on the plane z = 0; the apex is at infinity because z = zprp.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 4 questions →