1. Gyanastra
  2. Computer Graphics
  3. 3D Representation and Viewing
  4. 3D Viewing Projections and Clipping
Free lesson, no account needed 12 min read 27 practice questions after it
Asked in past papers10 times
  • ISRO2013
  • UGC NET202120202019201820172016201520142012

Computer Graphics · 3D Representation and Viewing

3D Viewing Projections and Clipping

Overview

3D viewing is the process of mapping a three-dimensional scene to a two-dimensional display through a sequence of coordinate transformations, projections, and clipping operations.
This lesson covers parallel and perspective projections, principal vanishing points, view volumes, homogeneous coordinates, the perspective divide, and the standard line and polygon clipping algorithms.
UGC NET tests both conceptual distinctions and small numerical or formula-based applications. You should already know Cartesian coordinates, vectors and dot products, matrices, line equations, and basic polygons.

Key concepts

  • A projection maps 3D points onto a projection plane using projectors from a centre of projection (COP) or along a direction of projection (DOP).
  • In a parallel projection, the COP is at infinity and all projectors are parallel. Parallel lines remain parallel, and the transformation is affine.
  • In a perspective projection, the COP is finite and projectors converge. Parallel lines generally do not remain parallel; they meet at vanishing points. Straight lines, however, still map to straight lines.
  • A principal vanishing point is the vanishing point for one of the three principal axes i,j,ki,j,k.
    For a principal direction DD, a finite principal vanishing point exists only when lines parallel to DD are not parallel to the view plane, equivalently when D⋅N≠0D\cdot N\ne 0, where NN is the view-plane normal.
  • One-point perspective: the view plane is parallel to two principal axes, so only one principal axis pierces the view plane. Two-point perspective: view plane is parallel to one principal axis.
    Three-point perspective: view plane is parallel to none.
  • For the standard perspective setup with COP at origin and view plane z=dz=d, only the KK-direction has a finite principal vanishing point.
    The ii and jj directions are parallel to the view plane, so their vanishing points are at infinity.
  • In perspective, objects farther from the COP appear smaller: perspective foreshortening. A parallel projection is the limiting case of perspective projection when the viewer goes infinitely far away.
  • View confusion: objects behind the COP can be projected upside down and backward because their viewing depth is negative.
  • Topological distortion: a line segment joining a point in front of the viewer to a point behind the viewer can project to a broken line of infinite extent as it crosses the plane through the COP.
  • Orthographic projection is a parallel projection with projectors perpendicular to the projection plane. It preserves parallelism and is an affine transformation.
    Axonometric projection is an orthographic projection in which the projection plane is not perpendicular to the principal axes; isometric is the axonometric case with equal foreshortening along the three axes.
  • Oblique projection is a parallel projection with projectors not perpendicular to the projection plane. Parallel lines remain parallel.
    Cavalier keeps the receding-axis length unchanged; cabinet halves the receding-axis length.
  • The 3D viewing pipeline normally is: world coordinates →\to viewing/camera coordinates →\to projection transform →\to homogeneous clip coordinates →\to clipping →\to perspective divide →\to normalized device coordinates →\to viewport mapping.
  • The viewing transformation moves the world so that the camera is at the origin and its axes align with the view direction. It is a rigid motion: translation plus rotation.
  • The view volume is the region visible after projection. For perspective it is a view frustum bounded by near, far, left, right, top and bottom planes.
    Normalization maps this frustum to a canonical axis-aligned box before clipping.
  • Homogeneous coordinates use an extra coordinate. In 2D, (x,y,w)(x,y,w) represents (x/w,y/w)(x/w,y/w); in 3D, (x,y,z,w)(x,y,z,w) represents (x/w,y/w,z/w)(x/w,y/w,z/w). A point with w=0w=0 is a point at infinity or direction.
    If a 2D homogeneous triple is written (x,y,z)(x,y,z), then z=0z=0 is the point at infinity.
  • The perspective transformation is represented by a 4×44\times4 homogeneous matrix, but the resulting Cartesian map x′=dx/z, y′=dy/zx'=dx/z,\ y'=dy/z is not linear because of division by zz.
    UGC treats “perspective transformation is a linear transformation” as false in Cartesian coordinates.
  • Clipping removes parts of lines, polygons, or objects outside the view volume/window. In 3D it is done against the six planes of the view volume; in homogeneous clipping the inequalities are −w≤x≤w-w\le x\le w, etc., after normalization.
  • Cohen–Sutherland line clipping uses region codes for trivial accept/reject and repeated boundary intersection.
  • Cyrus–Beck line clipping uses the parametric line and inward normals; it computes tt values at clipping boundaries.
  • Sutherland–Hodgman polygon clipping clips a polygon edge by edge against a convex clipping window/polygon. It is treated in UGC questions as a convex-polygon clipping method.
  • For a convex subject polygon with mm vertices clipped against a convex window with nn vertices, the result has at most m+nm+n vertices. Thus a triangle clipped by a rectangle can have at most 77 vertices, not 66.

How it works

  1. Transform the scene from world coordinates to viewing/camera coordinates using the camera position and orientation. This makes projection and clipping easier.
  2. Choose the projection type. For parallel projection, use a DOP; for perspective, use a finite COP.
  3. For perspective with COP at origin and view plane z=dz=d, a point P=(x,y,z)P=(x,y,z) projects to (dx/z,dy/z,d)(dx/z,dy/z,d). Points with z=0z=0 cannot be projected finitely; directions with z=0z=0 have vanishing points at infinity.
  4. Form the homogeneous projection matrix and keep points in homogeneous coordinates. Clipping is usually performed before the perspective divide to avoid division by zero and to work in clip space.
  5. Clip against the view volume. For a perspective frustum, clip against six planes: near, far, left, right, top and bottom. For a 3D Cohen–Sutherland clipper, use six region bits.
  6. For line clipping, first test both endpoints. If both are inside, accept; if both share an outside region, reject; otherwise find an intersection with a boundary and repeat.
  7. For Cyrus–Beck, substitute P(t)=P1+t(P2−P1)P(t)=P_1+t(P_2-P_1) into the boundary equation with an inward normal and solve for tt. Update the valid interval tmin⁡≤t≤tmax⁡t_{\min}\le t\le t_{\max}.
  8. For polygon clipping, apply Sutherland–Hodgman: process each boundary edge of the clip window.
    For each polygon edge, output vertices according to inside/outside cases: inside–inside output second vertex; inside–outside output intersection; outside–outside output nothing; outside–inside output intersection then second vertex.
  9. Perform the perspective divide ww to obtain normalized Cartesian coordinates, then map to the viewport.
Figure. Trace the ordered stages: world coordinates, viewing transformation, camera coordinates, projection transform, homogeneous clip coordinates, clip against view volume, perspective divide, normalized device coordinates, viewport mapping, and screen image.

Formulas

  • Perspective projection onto z=dz=d, COP at origin:
    x′=dxz,y′=dyz,z′=dx'=\frac{d x}{z},\qquad y'=\frac{d y}{z},\qquad z'=d Here d>0d>0, z≠0z\ne0, and visible points normally have z>0z>0.
  • Perspective projection matrix, column-vector convention:
    Mp=[d0000d0000d00010]M_p= \begin{bmatrix} d&0&0&0\\ 0&d&0&0\\ 0&0&d&0\\ 0&0&1&0 \end{bmatrix} Mp[x,y,z,1]T=[dx,dy,dz,z]TM_p[x,y,z,1]^T=[dx,dy,dz,z]^T Dividing by w=zw=z gives (dx/z,dy/z,d)(dx/z,dy/z,d).
  • Principal vanishing point for direction v=(vx,vy,vz)v=(v_x,v_y,v_z) under the above setup:
    V=(dvxvz,dvyvz,d)V=\left(\frac{d v_x}{v_z},\frac{d v_y}{v_z},d\right) If vz=0v_z=0, the direction is parallel to the view plane and its vanishing point is at infinity.
  • Uniform homogeneous coordinates:
    (x,y,z,w)≡(x/w,y/w,z/w,1),w≠0(x,y,z,w)\equiv (x/w,y/w,z/w,1),\quad w\ne0 With w=0w=0, the point is at infinity.
  • Parametric line segment:
    P(t)=P1+t(P2−P1),0≤t≤1P(t)=P_1+t(P_2-P_1),\qquad 0\le t\le1
  • Cyrus–Beck parameter for boundary point fif_i and inward normal nin_i:
    t=(fi−P1)⋅ni(P2−P1)⋅nit=\frac{(f_i-P_1)\cdot n_i}{(P_2-P_1)\cdot n_i} If D=P2−P1D=P_2-P_1, then t=(fi−P1)⋅niD⋅nit=\frac{(f_i-P_1)\cdot n_i}{D\cdot n_i}.
  • Line intersection with vertical boundary x=cx=c:
    t=c−x1x2−x1,y=y1+t(y2−y1)t=\frac{c-x_1}{x_2-x_1},\qquad y=y_1+t(y_2-y_1)
  • Plane clipping intersection: for plane ax+by+cz+d=0ax+by+cz+d=0,
    t=−ax1+by1+cz1+da(x2−x1)+b(y2−y1)+c(z2−z1)t=-\frac{a x_1+b y_1+c z_1+d}{a(x_2-x_1)+b(y_2-y_1)+c(z_2-z_1)}

Worked examples

Example 1. A point in camera coordinates is P=(4,2,8)P=(4,2,8). It is perspective-projected onto z=2z=2 with COP at the origin. Find the image coordinates on the projection plane.
Using x′=dx/zx'=dx/z and y′=dy/zy'=dy/z with d=2d=2:
x′=2⋅48=1,y′=2⋅28=0.5x'=\frac{2\cdot4}{8}=1,\qquad y'=\frac{2\cdot2}{8}=0.5 The projected point is (1,0.5,2)(1,0.5,2).

Example 2. In an oblique projection onto z=0z=0, x′=x+lzcos⁡45∘x'=x+lz\cos45^\circ, y′=y+lzsin⁡45∘y'=y+lz\sin45^\circ. For l=2l=2 and P=(3,4,5)P=(3,4,5), find the projected coordinates.
x′=3+2⋅5⋅22=3+52≈10.071x'=3+2\cdot5\cdot\frac{\sqrt2}{2}=3+5\sqrt2\approx10.071 y′=4+2⋅5⋅22=4+52≈11.071y'=4+2\cdot5\cdot\frac{\sqrt2}{2}=4+5\sqrt2\approx11.071 The projected point is approximately (10.071,11.071,0)(10.071,11.071,0).

Example 3. Derive the perspective matrix for COP at origin and view plane z=dz=d, then count the principal vanishing points.
For Ph=[x,y,z,1]TP_h=[x,y,z,1]^T:
MpPh=[dx,dy,dz,z]TM_pP_h=[dx,dy,dz,z]^T Divide by w=zw=z:
(dxz,dyz,d)\left(\frac{dx}{z},\frac{dy}{z},d\right) For direction i=(1,0,0)i=(1,0,0), vz=0v_z=0, so the vanishing point is at infinity. For j=(0,1,0)j=(0,1,0), also at infinity. For k=(0,0,1)k=(0,0,1):
V=(0,0,d)V=\left(0,0,d\right) Thus the standard setup has one principal vanishing point, in the KK direction.

Example 4. Clip the segment from P1=(0,0)P_1=(0,0) to P2=(10,0)P_2=(10,0) against the boundary x=5x=5, with the inside region x≤5x\le5. Use Cyrus–Beck.
Boundary point f=(5,0)f=(5,0), inward normal n=(−1,0)n=(-1,0), direction D=(10,0)D=(10,0).
(f−P1)⋅n=(5,0)⋅(−1,0)=−5(f-P_1)\cdot n=(5,0)\cdot(-1,0)=-5 D⋅n=(10,0)⋅(−1,0)=−10D\cdot n=(10,0)\cdot(-1,0)=-10 t=−5−10=0.5t=\frac{-5}{-10}=0.5 Intersection is (5,0)(5,0). Since the direction has negative dot product with the inward normal, this is a leaving point, so the clipped part is P1P_1 to (5,0)(5,0).

Example 5. Statement I: A triangle clipped to a rectangle can have at most 6 sides. Statement II: In 3D graphics, the perspective transformation is nonlinear in zz. Which are true?
A triangle has m=3m=3 vertices, a rectangle has n=4n=4, so a convex polygon intersection can have at most m+n=7m+n=7 vertices. Statement I is false. Perspective division by zz makes the Cartesian transformation nonlinear in zz, so Statement II is true. Correct answer: Statement I false, Statement II true.

Comparison

BasisParallel projectionPerspective projection
Centre of projectionAt infinityFinite
ProjectorsParallelConverging
Parallel lines in imageRemain parallelGenerally meet at vanishing points
Size with distanceDoes not changeFarther objects appear smaller
Affine transformationYesNo in Cartesian coordinates
Principal vanishing pointsNone finite1, 2 or 3 depending on view plane orientation
Projection typeKey property
OrthographicProjectors perpendicular to projection plane; preserves parallelism; affine
AxonometricOrthographic but plane not perpendicular to principal axes; isometric/dimetric/trimetric
IsometricEqual foreshortening along three principal axes
ObliqueParallel projectors not perpendicular to plane; parallel lines remain parallel
CavalierOblique with receding-axis foreshortening factor 11
CabinetOblique with receding-axis foreshortening factor 1/21/2
TermMeaning
View confusionObjects behind the COP appear upside down and backward
Topological distortionSegment crossing the plane through COP projects to a broken line of infinite extent
Perspective foreshorteningFarther objects appear smaller
Vanishing pointImage point where parallel lines meet in a perspective projection
AlgorithmUsed forMain idea
Cohen–SutherlandLine clippingRegion codes, trivial accept/reject, boundary intersections
Cyrus–BeckLine clippingParametric tt, inward normals, interval update
Liang–BarskyLine clippingParametric inequalities, efficient interval clipping
Sutherland–HodgmanPolygon clippingClip edge by edge against convex window
Weiler–AthertonPolygon clippingHandles concave clipping windows by following polygon boundaries

Revision summary

  • Parallel projection: parallel lines stay parallel; perspective projection: parallel lines may meet at vanishing points.
  • Standard perspective with plane z=dz=d, COP origin: only KK has a finite principal vanishing point.
  • One-point perspective: one principal vanishing point; two-point: two; three-point: three.
  • Perspective divide is x′=dx/z, y′=dy/zx'=dx/z,\ y'=dy/z; Cartesian perspective is nonlinear because of division by zz.
  • Homogeneous point at infinity: w=0w=0; in 2D triple (x,y,z)(x,y,z), z=0z=0 means infinity.
  • Cavalier keeps full length; cabinet halves the receding-axis length.
  • Orthographic projection preserves parallelism and is affine.
  • Oblique projectors are not perpendicular to the projection plane.
  • Behind the eye: view confusion. Crossing the eye plane: topological distortion.
  • Triangle clipped by rectangle: maximum 3+4=73+4=7 vertices, not 6.
  • Cyrus–Beck: t=((f−P1)⋅n)/((P2−P1)⋅n)t=((f-P_1)\cdot n)/((P_2-P_1)\cdot n), with 0≤t≤10\le t\le1.
  • Sutherland–Hodgman clips polygon vertices sequentially against each clip boundary.

Previous-year exam insights

  • Direct conceptual questions ask which projection preserves parallelism, which projection has projectors perpendicular to the plane, and what oblique projection means.
    Remember: parallel preserves parallelism; orthographic is perpendicular; oblique is not perpendicular.
  • Statement-based questions mix true and false ideas: “perspective makes parallel lines non-parallel” is generally true, but lines parallel to the view plane remain parallel; “perspective transformation is linear” is false in Cartesian coordinates.
  • Matching questions test cavalier, cabinet, isometric, orthographic, oblique, and perspective properties.
    Cavalier means no foreshortening on the receding axis; cabinet means half foreshortening.
  • Matrix questions ask for the standard perspective matrix on z=dz=d with COP at origin.
    Use column-vector convention and remember the last row contains the 11 that creates division by zz.
  • Numeric projection questions use x′=dx/z, y′=dy/zx'=dx/z,\ y'=dy/z or oblique formulas with cos⁡α,sin⁡α\cos\alpha,\sin\alpha.
    Check the given plane distance dd and whether the point has positive or negative zz.
  • Clipping questions ask about Cyrus–Beck formula, Cohen–Sutherland region codes, Sutherland–Hodgman use, and maximum vertices after clipping.
    For Cyrus–Beck use an inward normal and verify the tt interval.
  • Perspective “effect” questions distinguish view confusion, topological distortion, perspective foreshortening, and vanishing point.
    Do not interchange behind-the-eye confusion with crossing-the-eye-plane distortion.
  • A common trap is the claim “perspective projections do not preserve straight lines.” They do preserve straight lines; they fail to preserve parallelism.
    Another trap is “projectors are always perpendicular” for oblique projections; this is false.

Practice at PARIKSHA

You are ready for the PARIKSHA tests of this sub-topic when you can:

  1. Classify any given projection as parallel/perspective, orthographic/oblique, cavalier/cabinet, or one/two/three-point perspective.
  2. Count principal vanishing points and name their directions for standard and tilted view-plane setups.
  3. Compute perspective image coordinates using x′=dx/z, y′=dy/zx'=dx/z,\ y'=dy/z and identify points behind the viewer.
  4. Write and identify the standard perspective projection matrix on z=dz=d with COP at origin.
  5. Apply cavalier and cabinet oblique formulas and explain the foreshortening factor.
  6. Explain the 3D viewing pipeline order from world coordinates to screen coordinates.
  7. Apply Cohen–Sutherland region-code logic and Cyrus–Beck formula for line clipping.
  8. Clip a small polygon using Sutherland–Hodgman and count the maximum possible output vertices.
  9. Distinguish view confusion, topological distortion, perspective foreshortening, and vanishing point in statement-type questions.
  10. Handle homogeneous coordinates, including points at infinity with w=0w=0.

Attempt the sub-topic test first, then the subject test.

Pages 1–2 of 2