---
title: "Perspective projection of pyramid"
subject: "Computer Graphics"
chapter: 4
key: "semester_5/computer_graphics:perspective-pyramid-zprp-20"
source: https://www.bctengineer.com/q/semester_5/computer_graphics/perspective-pyramid-zprp-20
site: BCT Engineering
---

# Perspective projection of pyramid

Computer Graphics · Chapter 4: Three-Dimensional Graphics

- Asked in: 2070 Asar, 8 marks; 2076 Chaitra, 5 marks (asked 2 times)
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_graphics/perspective-pyramid-zprp-20
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_graphics/chapter-4

## Question

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.

## 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.

## Answer

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:

```text
| 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).

| Vertex | z | h = (20 − z)/20 | xp = x/h | yp = y/h | Projected |
|---|---|---|---|---|---|
| A(15,15,10) | 10 | 0.5 | 15/0.5 = 30 | 30 | (30, 30, 0) |
| B(20,20,10) | 10 | 0.5 | 40 | 40 | (40, 40, 0) |
| C(25,15,10) | 10 | 0.5 | 50 | 30 | (50, 30, 0) |
| D(20,10,10) | 10 | 0.5 | 40 | 20 | (40, 20, 0) |
| E apex(20,15,20) | 20 | 0 | 20/0 | 15/0 | undefined |

**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.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. With zprp = 20 and zvp = 0, dp equals:
   A. 0
   B. 10
   C. 20
   D. -20
   Answer: C. dp = zprp - zvp = 20 - 0 = 20. (Key point: Setup)

2. For base vertices with z = 10, h is:
   A. 0.5
   B. 1
   C. 2
   D. 0
   Answer: A. h = (20 - 10)/20 = 0.5. (Key point: Factor h for base)

3. Vertex A(15,15,10) projects to:
   A. (7.5, 7.5, 0)
   B. (30, 30, 0)
   C. (15, 15, 0)
   D. (30, 30, 10)
   Answer: B. xp = 15/0.5 = 30, yp = 15/0.5 = 30, zp = 0. (Key point: Projection of A)

4. Why can the apex (20,15,20) not be projected?
   A. It lies exactly on the view plane
   B. Its x and y are equal
   C. It lies behind the view plane
   D. Its z equals zprp, so h = 0 and the image is at infinity
   Answer: D. The projector from the COP to the apex is parallel to the view plane and never meets it. (Key point: Apex)

## Related in Computer Graphics

- [Bresenham: line (25,20) to (15,10)](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Adigitize-line-25-20-15-10) — Computer Graphics, chapter 2
- [Derive perspective projection matrix](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Aperspective-projection-matrix-derive) — Computer Graphics, chapter 4, asked 3×
- [3D rotation steps and perspective projection](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Arotate-3d-arbitrary-axis-perspective) — Computer Graphics, chapter 4
- [Need of perspective projection](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Awhy-perspective-projection-world-to-viewing) — Computer Graphics, chapter 4
- [Short note: Two-point perspective projection](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Ashort-note-two-point-perspective) — Computer Graphics, chapter 4
- [Bezier points at u=0.25,0.5,0.75: (10,15)...](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Abezier-points-control-10-15) — Computer Graphics, chapter 5, asked 4×

## Related in other subjects

- [Reactance diagram: 20 MVA generator, 15 kV/25 MVA base](https://www.bctengineer.com/question.md?key=semester_4%2Fpower_system_analysis_i%3Areactance-diagram-20mva-15kv-25mva) — Power System Analysis I, chapter 3
- [Highway circular curve, apex distance 15.876 m](https://www.bctengineer.com/question.md?key=semester_4%2Fsurveying_ii%3Ahighway-curve-apex-distance-tangential-angle) — Surveying II, chapter 6
- [Laplace: 2x2 grid 10/15/20](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Alaplace-2x2-10-15-20-25) — Numerical Method, chapter 7, asked 6×
- [T-beam: bending stress 15 cm above base](https://www.bctengineer.com/question.md?key=semester_3%2Fstrength_of_materials%3At-beam-udl-5m-bending-stress) — Strength of Materials, chapter 7
