Divide by w to get the 3 d cartesian coordinates 3d

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: he parallel canonical view-volume with the following matrix: Final step. • Divide by w to get the 3-D 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 (Cohen-Sutherland algorithm) • Clipping polygons (Sutherland-Hodgman algorithm) Cohen-Sutherland 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 Cohen-Sutherland 2D outcodes • The whole space is split into 9 regions • Only the center region is visible • Each region is encoded by four bits Cohen-Sutherland 2D outcodes 4th bit 3rd bit 1st bit 2nd bit – – – – – 4-bit code called: Outcode First bit : above top of window, y > ymax Second bit :...
View Full Document

This document was uploaded on 03/26/2014.

Ask a homework question - tutors are online