This preview shows page 1. Sign up to view the full content.
Unformatted text preview: he parallel canonical viewvolume with the following
matrix: Final step.
• Divide by w to get the 3D Cartesian coordinates
• 3D Clipping
• The Canonical view volume is defined by: 1≤x ≤1, 1 ≤y ≤1 , 1 ≤z ≤1
• Simply need to check the (x,y,z) coordinates and see if
they are within the canonical view volume Exercise • How does ABC look like after
the projection? ABC projected
ABC Summary of Projection
● Two kind of projections:
○ ● ● parallel and perspective We can project points onto the screen by
using projection matrices
Canonical view volume is useful for telling if
the point is within the view volume
○ parts outside must be clipped Overview
• View transformation
– Parallel projection
– Perspective projection
– Canonical view volume • Clipping
– Line / Polygon clipping Projecting polygons and lines
• After projection, a line in 3D space
becomes a line in 2D space
• A polygon in 3D space becomes a
polygon in 2D space Clipping
• We need to clip objects outside the canonical
view volume • Clipping lines (CohenSutherland algorithm)
• Clipping polygons (SutherlandHodgman
algorithm) CohenSutherland algorithm
A systematic approach to clip lines
Input: The screen and a 2D line segment
(let’s start with 2D first)
Output: Clipped line segment CohenSutherland 2D outcodes • The whole space is split into 9 regions
• Only the center region is visible
• Each region is encoded by four bits CohenSutherland 2D outcodes
4th bit 3rd bit 1st bit 2nd bit –
–
–
–
– 4bit code called: Outcode
First bit : above top of window, y > ymax
Second bit :...
View
Full
Document
This document was uploaded on 03/26/2014.
 Spring '14

Click to edit the document details