Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

4.4 Perspective Projection - 1, 2, 3 Point

Lesson 30 of 32 in the free Computer Graphics notes on Siksha Sarovar, written by Rohit Jangra.

How Perspective Works

Perspective projection mirrors how lenses (and eyes) work: parallel lines that recede from the viewer converge at one or more vanishing points on the horizon. Objects further from the eye appear smaller (foreshortening proportional to 1/z).

Number of Vanishing Points

  • 1-Point: View plane is parallel to two principal axes. Lines along the third axis meet at one vanishing point. Example: looking straight down a railroad track or a hallway.
  • 2-Point: View plane is parallel to one principal axis (typically Y, vertical). The other two axes each yield a vanishing point on the horizon. Example: standing on a sidewalk looking at a corner of a building.
  • 3-Point: View plane is not parallel to any principal axis. Three vanishing points - one on the horizon for each receding direction, plus a third above (looking up) or below (looking down). Example: photographing a skyscraper from street level (vertical lines converge upward).

Math: Perspective Matrix (COP at origin, plane at z = -n)

M_per = [ n 0 0 0 ] [ 0 n 0 0 ] [ 0 0 -(f+n)/(f-n) -2fn/(f-n) ] [ 0 0 -1 0 ] where n and f are near and far clipping plane distances. After multiplying [x,y,z,1]^T we divide x and y by w (= -z) -> the perspective divide that creates foreshortening.

In simpler 1-point form on plane z = d with COP at origin: x' = d x / z y' = d y / z

Field of View

The horizontal FOV theta is set by the aspect ratio and focal length: tan(theta/2) = (image_width/2) / d. Wide FOV (90+) feels distorted at edges; narrow FOV (~30) looks zoomed-in. Cinematic FOV is around 50-60.

Worked Example

Camera at origin, plane at d = 5. Cube with corners (1,1,5) and (1,1,15).

  • Corner at z=5: x' = 5*1/5 = 1, y' = 1.
  • Corner at z=15: x' = 5*1/15 = 0.333, y' = 0.333.
  • The corner three times further appears at one third the apparent size - exactly 1/z scaling.

Comparison

Feature1-Point2-Point3-Point
Vanishing points123
View plane parallel to2 principal axes1 principal axis0
Visual feelLinear corridorReal-world standingDramatic angle
Common inTutorials, simple scenesArchitectureCinema, comics

Pros and Cons of Perspective

  • Pros: Realistic depth perception; matches photographic and human vision.
  • Cons: Distorts measurements (parallel lines bend), making it unsuitable for engineering documentation; objects directly between viewer and frustum walls can be partially clipped strangely.

Far/Near Plane Tradeoffs

  • Near plane too small -> z-fighting (depth precision loss) on far geometry.
  • Far plane too large -> z-buffer wastes precision on emptiness.
  • Common rule: keep far/near ratio under ~1000 for 24-bit depth buffer.