Graphics Graphics Korea University cgvr.korea.ac.kr 1 2D Viewing 고려대학교 컴퓨터 그래픽스 연구실.

Slides:



Advertisements
Similar presentations
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1 Emmanuel Agu.
Advertisements

Basic Raster Graphics Algorithms for Drawing 2D Primitives
CS 450: COMPUTER GRAPHICS FILLING POLYGONS SPRING 2015 DR. MICHAEL J. REALE.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Hidden Surface Removal 고려대학교 컴퓨터 그래픽스 연구실.
Course Website: Computer Graphics 4: Viewing In 2D.
Two-Dimensional Viewing Jehee Lee Seoul National University.
Computer Graphics : Clipping
Computer Graphics Viewing.
Viewing & Clipping In 2D. 2 of 44 Contents Windowing Concepts Clipping –Introduction –Brute Force –Cohen-Sutherland Clipping Algorithm Area Clipping –Sutherland-Hodgman.
CMPE 466 COMPUTER GRAPHICS Chapter 8 2D Viewing Instructor: D. Arifler Material based on - Computer Graphics with OpenGL ®, Fourth Edition by Donald Hearn,
2D Viewing and Projection
2 D viewing Prepared by Elizabeth Isaac DCS, RSET.
Introduction to Computer Graphics Chapter 6 – 2D Viewing Pt 2 1.
Graphics Graphics Korea University cgvr.korea.ac.kr 3D Object Representation 고려대학교 컴퓨터 그래픽스 연구실.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Interpolation Clipping.
Informationsteknologi Thursday, November 22, 2007Computer Graphics - Class 111 Today’s class Clipping Parametric and point-normal form of lines Intersecting.
Vertices and Fragments I CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
1 Jinxiang Chai CSCE 441 Computer Graphics. 2 Midterm Time: 10:10pm-11:20pm, 10/20 Location: HRBB 113.
1 CSCE 441 Computer Graphics: Clipping Lines Jinxiang Chai.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Clipping.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Implementation I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
1 Computer Graphics Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD3107 University of Palestine.
2-Dimension Viewing and Clipping
Basics of Rendering Pipeline Based Rendering –Objects in the scene are rendered in a sequence of steps that form the Rendering Pipeline. Ray-Tracing –A.
Graphics Graphics Korea University cgvr.korea.ac.kr Raster Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
Two-Dimensional Viewing
3/4/04© University of Wisconsin, CS559 Spring 2004 Last Time Clipping Lines –Cohen-Sutherland: The use of outcodes and early reject/accept tests –Liang-Barsky:
Graphics Graphics Korea University cgvr.korea.ac.kr Raster Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
Graphics Graphics Korea University cgvr.korea.ac.kr Solid Modeling 고려대학교 컴퓨터 그래픽스 연구실.
CS 480/680 Computer Graphics Shading in OpenGL Dr. Frederick C Harris, Jr. Fall 2013.
Graphics Graphics Korea University cgvr.korea.ac.kr 3D Viewing 고려대학교 컴퓨터 그래픽스 연구실.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Hidden Surface Removal
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
Unit – IV 2D Viewing. 2 of 30 Contents Windowing Concepts The viewing pipeline viewing coordinate reference frame, window to view-port coordinate transformation,
EEL Introduction to Computer Graphics
Implementation of a Renderer Consider Programs are processd by the system line & polygon, outside the view volume Efficiently Understanding of the implementation.
CSC418 Computer Graphics n Polygons –Triangulation –Scan conversion –Convex/Concave – clipping) n 2D affine transformations and properties, Homogeneous.
Computer Graphics Filling. Filling Polygons So we can figure out how to draw lines and circles How do we go about drawing polygons? We use an incremental.
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
Graphics Pipeline Rasterization CMSC 435/634. Drawing Terms Primitive – Basic shape, drawn directly – Compare to building from simpler shapes Rasterization.
1Computer Graphics Implementation 1 Lecture 15 John Shearer Culture Lab – space 2
Lecture 15: Raster Graphics and Scan Conversion
Graphics Graphics & Graphical Programming Lecture 23 - Viewing & Clipping.
1 CSCE 441: Computer Graphics Scan Conversion of Polygons Jinxiang Chai.
A.Aruna/Assistant Professor/SNSCE
Lecture 13: Raster Graphics and Scan Conversion
Rasterization Overview Raster Display Device. Scan Conversion / Rasterization: converting vector graphics into raster graphics (determining pixels in.
Computer Graphics CC416 Week 14 Filling Algorithms.
Computer Graphics Lecture 08 Taqdees A. Siddiqi Computer Graphics Filled Area Primitives I Lecture 08 Taqdees A. Siddiqi
2D rendering Szirmay-Kalos László. Reference state (modeling space) vectorization Modeling transform World window Screen or appWindow viewport Normalized.
Computer Graphics Viewing. 2 of 30 Viewing in 2D Window in world coordinates. 45  250  Viewport in Device coords 250 x 250 Pixels.
Graphics Graphics Korea University cgvr.korea.ac.kr Introduction to Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
3D Rendering 2016, Fall.
Rendering Pipeline Fall, 2015.
Computer Graphics CC416 Week 13 Clipping.
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1
Clipping Polygon Clipping Polygon : Area primitive
2D Viewing & Clipping 한신대 류승택
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
WINDOWING AND CLIPPING
WINDOWING AND CLIPPING
NOTE.
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
3D Object Representation
Presentation transcript:

Graphics Graphics Korea University cgvr.korea.ac.kr 1 2D Viewing 고려대학교 컴퓨터 그래픽스 연구실

CGVR Graphics Korea University cgvr.korea.ac.kr 2 Contents 3D Rendering Pipeline 2D Rendering Pipeline Clipping Cohen-Sutherland Line Clipping Sutherland-Hodgeman Polygon Clipping Viewport Transformation Scan Conversion Summary of Transformation

CGVR Graphics Korea University cgvr.korea.ac.kr 3 3D Rendering Pipeline Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion 3D Primitives Image 3D Modeling Coordinates 3D World Coordinates 3D Viewing Coordinates 2D Projection Coordinates 2D Device Coordinates

CGVR Graphics Korea University cgvr.korea.ac.kr 4 3D Rendering Pipeline Model Transformation Lighting Viewing Transformation Projection Transformation Clipping Viewport Transformation Scan Conversion 3D Primitives Image 3D Modeling Coordinates 3D World Coordinates 3D Viewing Coordinates 2D Projection Coordinates 2D Device Coordinates

CGVR Graphics Korea University cgvr.korea.ac.kr 5 2D Rendering Pipeline 3D Primitives Clipping Viewport Transformation Scan Conversion Image Clip portions of geometric primitives residing outside window Transform the clipped primitives from screen to image coordinates Fill pixel representing primitives in screen coordinates 2D Primitives

CGVR Graphics Korea University cgvr.korea.ac.kr 6 2D Rendering Pipeline 3D Primitives Clipping Viewport Transformation Scan Conversion Image Clip portions of geometric primitives residing outside window Transform the clipped primitives from screen to image coordinates Fill pixel representing primitives in screen coordinates 2D Primitives

CGVR Graphics Korea University cgvr.korea.ac.kr 7 Clipping Avoid Drawing Parts of Primitives Outside Window Window defines part of scene being viewed Must draw geometric primitives only inside window World Coordinates

CGVR Graphics Korea University cgvr.korea.ac.kr 8 Clipping Avoid Drawing Parts of Primitives Outside Window Window defines part of scene being viewed Must draw geometric primitives only inside window

CGVR Graphics Korea University cgvr.korea.ac.kr 9 Clipping Avoid Drawing Parts of Primitives Outside Window Points Lines Polygons Circles etc.

CGVR Graphics Korea University cgvr.korea.ac.kr 10 Point Clipping Is Point(x,y) Inside the Clip Window? (x, y) wx2wx1 wy1 wy2 Inside = (x>=wx1) && (x<=wx2) && (y>=wy1) && (y<=wy2); Inside = (x>=wx1) && (x<=wx2) && (y>=wy1) && (y<=wy2);

CGVR Graphics Korea University cgvr.korea.ac.kr 11 Line Clipping Find the Part of a Line Inside the Clip Window P7P7 P8P8 P 10 P9P9 P1P1 P2P2 P5P5 P4P4 P3P3 P6P6 Before Clipping

CGVR Graphics Korea University cgvr.korea.ac.kr 12 Line Clipping Find the Part of a Line Inside the Clip Window After Clipping P4P4 P3P3 P6P6 P’ 8 P’ 7 P’ 5

CGVR Graphics Korea University cgvr.korea.ac.kr 13 Cohen-Sutherland Line Clipping Use Simple Tests to Classify Easy Cases First P7P7 P8P8 P 10 P9P9 P1P1 P2P2 P5P5 P4P4 P3P3 P6P6

CGVR Graphics Korea University cgvr.korea.ac.kr 14 Cohen-Sutherland Line Clipping Classify Some Lines Quickly by AND of Bit Codes Representing Regions of Two Endpoints (Must Be 0) P 10 P5P5 P6P6 P9P P7P7 P8P P1P1 P2P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1

CGVR Graphics Korea University cgvr.korea.ac.kr 15 Cohen-Sutherland Line Clipping Classify Some Lines Quickly by AND of Bit Codes Representing Regions of Two Endpoints (Must Be 0) P 10 P5P5 P6P6 P9P P7P7 P8P P1P1 P2P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1

CGVR Graphics Korea University cgvr.korea.ac.kr 16 Cohen-Sutherland Line Clipping Classify Some Lines Quickly by AND of Bit Codes Representing Regions of Two Endpoints (Must Be 0) P 10 P5P5 P6P6 P9P P7P7 P8P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1

CGVR Graphics Korea University cgvr.korea.ac.kr 17 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P 10 P5P5 P6P6 P9P P7P7 P8P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1

CGVR Graphics Korea University cgvr.korea.ac.kr 18 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P 10 P5P5 P6P6 P9P P7P7 P8P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1

CGVR Graphics Korea University cgvr.korea.ac.kr 19 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P 10 P6P6 P9P P7P7 P8P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1 P’ 5

CGVR Graphics Korea University cgvr.korea.ac.kr 20 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P 10 P6P6 P9P P7P7 P8P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1 P’ 5

CGVR Graphics Korea University cgvr.korea.ac.kr 21 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P 10 P6P6 P9P P7P7 P8P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1 P’ 5

CGVR Graphics Korea University cgvr.korea.ac.kr 22 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P 10 P6P6 P9P P7P7 P8P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1 P’ 5

CGVR Graphics Korea University cgvr.korea.ac.kr 23 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P 10 P6P6 P9P P8P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1 P’ 5 P’ 7

CGVR Graphics Korea University cgvr.korea.ac.kr 24 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P 10 P6P6 P9P P8P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1 P’ 5 P’ 7

CGVR Graphics Korea University cgvr.korea.ac.kr 25 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P 10 P6P6 P9P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1 P’ 5 P’ 7 P’ 8

CGVR Graphics Korea University cgvr.korea.ac.kr 26 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P 10 P6P6 P9P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1 P’ 5 P’ 7 P’ 8

CGVR Graphics Korea University cgvr.korea.ac.kr 27 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P 10 P6P6 P9P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1 P’ 5 P’ 7 P’ 8

CGVR Graphics Korea University cgvr.korea.ac.kr 28 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P 10 P6P6 P9P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1 P’ 5 P’ 7 P’ 8

CGVR Graphics Korea University cgvr.korea.ac.kr 29 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P 10 P6P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1 P’ 5 P’ 7 P’ 8 P’ 9

CGVR Graphics Korea University cgvr.korea.ac.kr 30 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P6P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1 P’ 5 P’ 7 P’ 8 P 10 P’ 9

CGVR Graphics Korea University cgvr.korea.ac.kr 31 Cohen-Sutherland Line Clipping Compute Intersections with Window Boundary for Lines That Can’t be Classified Quickly P6P P4P4 P3P3 Bit 4 Bit 3 Bit 2Bit 1 P’ 5 P’ 7 P’ 8

CGVR Graphics Korea University cgvr.korea.ac.kr 32 Polygon Clipping Find the Part of a Polygon Inside the Clip Window? Before Clipping

CGVR Graphics Korea University cgvr.korea.ac.kr 33 Polygon Clipping Find the Part of a Polygon Inside the Clip Window? After Clipping

CGVR Graphics Korea University cgvr.korea.ac.kr 34 Sutherland-Hodgeman Polygon Clipping Clip to Each Window Boundary One at a Time

CGVR Graphics Korea University cgvr.korea.ac.kr 35 Sutherland-Hodgeman Polygon Clipping Clip to Each Window Boundary One at a Time

CGVR Graphics Korea University cgvr.korea.ac.kr 36 Sutherland-Hodgeman Polygon Clipping Clip to Each Window Boundary One at a Time

CGVR Graphics Korea University cgvr.korea.ac.kr 37 Sutherland-Hodgeman Polygon Clipping Clip to Each Window Boundary One at a Time

CGVR Graphics Korea University cgvr.korea.ac.kr 38 Sutherland-Hodgeman Polygon Clipping Clip to Each Window Boundary One at a Time

CGVR Graphics Korea University cgvr.korea.ac.kr 39 Clipping to a Boundary Do Inside Test for Each Point in Sequence, Insert New Points When Cross Window Boundary, Remove Points Outside Window Boundary P1P1 P2P2 P3P3 P4P4 P5P5 Inside Outside Window Boundary

CGVR Graphics Korea University cgvr.korea.ac.kr 40 Clipping to a Boundary Do Inside Test for Each Point in Sequence, Insert New Points When Cross Window Boundary, Remove Points Outside Window Boundary P1P1 P2P2 P3P3 P4P4 P5P5 Inside Outside Window Boundary

CGVR Graphics Korea University cgvr.korea.ac.kr 41 Clipping to a Boundary Do Inside Test for Each Point in Sequence, Insert New Points When Cross Window Boundary, Remove Points Outside Window Boundary P1P1 P2P2 P3P3 P4P4 P5P5 Inside Outside Window Boundary

CGVR Graphics Korea University cgvr.korea.ac.kr 42 Clipping to a Boundary Do Inside Test for Each Point in Sequence, Insert New Points When Cross Window Boundary, Remove Points Outside Window Boundary P1P1 P2P2 P3P3 P4P4 P5P5 Inside Outside Window Boundary

CGVR Graphics Korea University cgvr.korea.ac.kr 43 Clipping to a Boundary Do Inside Test for Each Point in Sequence, Insert New Points When Cross Window Boundary, Remove Points Outside Window Boundary P1P1 P2P2 P3P3 P4P4 P5P5 Inside Outside Window Boundary P’

CGVR Graphics Korea University cgvr.korea.ac.kr 44 Clipping to a Boundary Do Inside Test for Each Point in Sequence, Insert New Points When Cross Window Boundary, Remove Points Outside Window Boundary P1P1 P2P2 P3P3 P4P4 P5P5 Inside Outside Window Boundary P’

CGVR Graphics Korea University cgvr.korea.ac.kr 45 Clipping to a Boundary Do Inside Test for Each Point in Sequence, Insert New Points When Cross Window Boundary, Remove Points Outside Window Boundary P1P1 P2P2 P3P3 P4P4 P5P5 Inside Outside Window Boundary P’

CGVR Graphics Korea University cgvr.korea.ac.kr 46 Clipping to a Boundary Do Inside Test for Each Point in Sequence, Insert New Points When Cross Window Boundary, Remove Points Outside Window Boundary P1P1 P2P2 P3P3 P4P4 P5P5 Inside Outside Window Boundary P’P”

CGVR Graphics Korea University cgvr.korea.ac.kr 47 Clipping to a Boundary Do Inside Test for Each Point in Sequence, Insert New Points When Cross Window Boundary, Remove Points Outside Window Boundary P1P1 P2P2 Inside Outside Window Boundary P’P”

CGVR Graphics Korea University cgvr.korea.ac.kr 48 2D Rendering Pipeline 3D Primitives Clipping Viewport Transformation Scan Conversion Image Clip portions of geometric primitives residing outside window Transform the clipped primitives from screen to image coordinates Fill pixel representing primitives in screen coordinates 2D Primitives

CGVR Graphics Korea University cgvr.korea.ac.kr 49 Viewport Transformation Transform 2D Geometric Primitives from Screen Coordinate System (Projection Coordinates) to Image Coordinate System (Device Coordinates) Screen Image Viewport

CGVR Graphics Korea University cgvr.korea.ac.kr 50 Window vs. Viewport Window World-coordinate area selected for display What is to be viewed Viewport Area on the display device to which a window is mapped Where it is to be displayed

CGVR Graphics Korea University cgvr.korea.ac.kr 51 Viewport Transformation Window-to-Viewport Mapping (wx, wy) wx2wx1 wy1 wy2 (vx, vy) vx2vx1 vy1 vy2 WindowViewport Screen CoordinatesImage Coordinates vx = vx1 + (wx – wx1) * (vx2 – vx1) / (wx2 – wx1); vy = vy1 + (wy – wy1) * (vy2 – vy1) / (wy2 – wy1); vx = vx1 + (wx – wx1) * (vx2 – vx1) / (wx2 – wx1); vy = vy1 + (wy – wy1) * (vy2 – vy1) / (wy2 – wy1);

CGVR Graphics Korea University cgvr.korea.ac.kr 52 2D Rendering Pipeline 3D Primitives Clipping Viewport Transformation Scan Conversion Image Clip portions of geometric primitives residing outside window Transform the clipped primitives from screen to image coordinates Fill pixel representing primitives in screen coordinates 2D Primitives

CGVR Graphics Korea University cgvr.korea.ac.kr 53 Scan Conversion Definition Figure out which pixels to fill Example Filling the inside of a triangle P1P1 P2P2 P3P3

CGVR Graphics Korea University cgvr.korea.ac.kr 54 Triangle Scan Conversion Simple Algorithm Color all pixels inside a triangle Inside triangle test  A point is inside a triangle if it is in the positive halfspace of all three boundary lines L1L1 L2L2 L3L3 P

CGVR Graphics Korea University cgvr.korea.ac.kr 55 Triangle Scan Conversion Triangle Sweep-Line Algorithm Take advantage of spatial coherence  Compute which pixels are inside using horizontal spans  Process horizontal spans in scan-line order Take advantage of edge linearity  Use edge slopes to update coordinates incrementally dx dy

CGVR Graphics Korea University cgvr.korea.ac.kr 56 Polygon Scan Conversion Fill Pixels Inside a Polygon Triangle Quadrilateral Convex Star-Shaped Concave Self-Intersecting Holes

CGVR Graphics Korea University cgvr.korea.ac.kr 57 Inside Polygon Rule Need Better Test for Points Inside a Polygon “Inside triangle test” works only for convex polygon L1L1 L2L2 L3L3 L4L4 L5L5 L1L1 L2L2 L3L3 L4L4 L 5A L 5B Convex PolygonConcave Polygon

CGVR Graphics Korea University cgvr.korea.ac.kr 58 Inside Polygon Rule Odd-Parity Rule Any ray from P to infinity crosses odd number of edges ConcaveSelf-IntersectingWith Holes

CGVR Graphics Korea University cgvr.korea.ac.kr 59 Polygon Scan Conversion Polygon Line-Sweep Algorithm Incremental algorithm to find spans, and determine insideness with odd-parity rule TrianglePolygon

CGVR Graphics Korea University cgvr.korea.ac.kr 60 Polygon Scan Conversion Hardware Scan Conversion Convert everything into Triangles

CGVR Graphics Korea University cgvr.korea.ac.kr 61 Summary of Transformation P(x, y, z) Viewing Transformation Viewing Transformation Projection Transformation Projection Transformation Window-to-Viewport Transformation Window-to-Viewport Transformation P(x, y) Modeling Transformation Modeling Transformation 3D Object Coordinates 3D World Coordinates 3D Viewing Coordinates 2D Projection Coordinates 2D Device Coordinates