Show Menu
Cheatography

Computer Graphics 4 Cheat Sheet (DRAFT) by

Computer Graphics Turbo C

This is a draft cheat sheet. It is a work in progress and is not finished yet.

UNIT 4

PART A
modeling transf­orm­ations
Viewing transf­orm­ations
world coordinate system.
re-pos­ition the scene in front of a camera
view orient­ation transf­orm­ation
DC to WC; camera at origin looking along -z axis
parallel projection
perspe­ctive projection
preserves true measur­ements; less realistic
realistic (depth); does not preserve true measur­ements
Center of Projection (COP) or Projection Reference Point (PRP) is the single point where all projectors converge
Viewport Clipping - after projection in standard viewing pipeline (before the perspe­ctive projection division; avoids division by zero)
Back-Face Detection condition
V = N • D
Scan-Line Method
determines the closest object along the line of sight (depth) and its corres­ponding color
Painter's Algorithm. - Depth-­Sorting Method
Primary criterion: sorted by minimum z-depth
Ambiguity tests: Bounding rectangle overlap test, depth overlap test, surface inters­ection test, and final "­com­plete behind­" test.
composite transf­orm­ation matrix is not commut­ative
limitation of Back-Face
Detection : multiple front faces overlap or obscure each other (hard to detect)
 

Parallel vs. Perspe­ctive projection

Parallel projection
Perspe­ctive projection
Orthog­raphic: perpen­dicular rays
Oblique: angled rays
converge at a point (fores­hor­tening)
No depth cues, looks artifi­cial, parallel lines stay parallel
Realistic, depth visible, lines converge (vanishing points)
Technical Drawings
Realistic Visual­ization
Parallel → accuracy & measur­ement
Perspe­ctive → realism & depth

Back-Face Detection algorithm

Removes polygons whose normal faces away from viewer
N⋅V≤0⇒­discard
Sufficient for:
Single, convex, closed objects (e.g., cube)
Limita­tions
1. Concave Objects:
May remove faces that are actually visible
2. Multiple Objects:
Cannot decide visibility between different objects; No depth comparison
3. Transp­arent Surfaces:
Incorr­ectly removes visible back faces
4. Open Surfaces:
Back-face concept may not apply
5. Does not resolve cyclic overlap cases
6. Object­-space only; doesn’t compare between objects
does not work for scene-­level visibility
It is a pre-­pro­cessing culling step that reduces the polygon count sent to the rendering pipeline (by ~50%).
followed by a true Hidden Surface Removal (HSR) ­alg­orithm (e.g., Depth-­Buf­fer­/Z-­Buffer, Painter's, BSP Trees)

3D clipping

Steps
1. Transform vertices → Normalized Device Coordi­nates (NDC) using projection
2. Clip against 6 planes of canonical cube:
x=±1, y=±1, z=0/1
3. Test vertices (insid­e/o­utside)
4. Compute inters­ection points if edges cross planes
5. Discard outside parts, pass clipped primitives for viewport mapping
Standa­rdized Cube
Uniform planes (insid­e/out and inters­ection math faster); hardware optimized; simplified depth (0 to 1)
Clipping in normalized space: consis­tency & simplicity (axis-­aligned with plane equations than skewed, perspe­ctive dependent frustum); device indepe­ndence; efficiency
 

3D projection

Perspe­ctive Projection
1. find parameter t
t=zp-zCoP/z-z~CoP
2. projected x' and y'
x′=xCoP​+t(x−xCoP​)
y′=yCoP​+t(y−yCoP​)
3. projected z'
z′=zp
Orthog­raphic Projection
1. Keep x and y unchanged
x′=x, y′=y
2. Set z to projection plane
z′=zp​

Multi-­Vie­wport Viewing Pipeline for CAD

1. Divergence of Single Modeling Stream
One modeling transf­orm­ation pipeline (world­/model matrix) feeds all viewports.
2. Viewing & Projection Management
Each viewport has its own:
View Matrix (camera orientation)
Projection Matrix
Orthog­raphic (Top, Front, Side)
Perspective (3D view)
3. Clipping per Viewport
Clipping done indepe­ndently for each viewport (frustum)
4. Overall archit­ecture
Model Transform → Stream Duplic­ation → Parallel Per-Vi­ewport (View+Proj Transform → Clipping → Viewport Transf­orm).

Multi-­Vie­wport Viewing Pipeline for CAD

1. Divergence of Single Modeling Stream
One modeling transf­orm­ation pipeline (world­/model matrix) feeds all viewports.
2. Viewing & Projection Management
Each viewport has its own:
View Matrix (camera orientation)
Projection Matrix
Orthog­raphic (Top, Front, Side)
Perspective (3D view)