04_2DViewing(ch6)

04_2DViewing(ch6) - Two-Dimensional Viewing Chapter 6...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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

Unformatted text preview: Two-Dimensional Viewing Chapter 6 Viewing Pipeline Viewing Pipeline Two Two-Dimensional Viewing Dimensional Viewing n Two dimensional viewing transformation n From world coordinate scene description to device (screen) coordinates Normalization and Viewport Normalization and Viewport Transformation Transformation n World coordinate clipping window n Normalization square: usually [-1,1]x[-1,1] n Device coordinate viewport Normalization and Viewport Normalization and Viewport Transformation Transformation ú ú ú ú ú ú û ù ê ê ê ê ê ê ë é- +--- +-- = 1 2 2 min max min max min max min max min max min max , yw yw yw yw yw yw xw xw xw xw xw xw M normsquare window ú ú ú ú ú ú û ù ê ê ê ê ê ê ë é +- +- = 1 2 2 2 2 min max min max min max min max , yv yv yv yv xv xv xv xv M viewport normsquare Clipping Clipping § Remove portions of a picture outside viewport or screen boundaries § Two approaches: § Clip during scan conversion: per-pixel bounds check, or span endpoint tests. § Clip analytically, then scan-convert the modified primitive. Two Two-Dimensional Clipping Dimensional Clipping n Point clipping – trivial n Line clipping (straight-line segments) n Cohen-Sutherland n Cyrus-Beck n Liang-Barsky n Fill-area clipping (polygons) n Sutherland-Hodgeman n Weiler-Atherton n Curve clipping n Text clipping max min max min yw y yw xw x xw £ £ £ £ Line Clipping Line Clipping n Basic calculations n Is an endpoint inside or outside the clip rectangle? n Find the point of intersection, if any, between a line segment and an edge of the clip rectangle. ü Both endpoints inside ç trivial accept ü One inside ß find intersection and clip ü Both outside ß either clip or reject 1 ) ( ) ( £ £- + =- + = u y y u y y x x u x x end end Cohen Cohen-Sutherland Sutherland Line Line-Clipping Algorithm Clipping Algorithm 0000 1000 1001 0001 0101 0100 0110 0010 1010 View port < Region code for each endpoint > above below right left Bit 4 3 2 1 Cohen Cohen-Sutherland Sutherland Line Line-Clipping Algorithm Clipping Algorithm n Trivially accepted if // completely inside n Trivially rejected if // completely outside n Otherwise, divide line into two segments Ø test intersection edges in a fixed order....
View Full Document

This note was uploaded on 04/29/2010 for the course CSE 4190.411 taught by Professor Shinyeonggil during the Fall '08 term at Seoul National.

Page1 / 37

04_2DViewing(ch6) - Two-Dimensional Viewing Chapter 6...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online