Window to viewport transformation&matrix representation of homogeneous coordinates
4,408 views
14 slides
May 20, 2018
Slide 1 of 14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
About This Presentation
computer graphics
Size: 771.83 KB
Language: en
Added: May 20, 2018
Slides: 14 pages
Slide Content
Window to viewport Transformation & Matrix Representation of Homogeneous Coordinates
What is window? A world-coordinate area selected for display is called a window . You can define the window to be larger than, the same size as, or smaller than the actual range of data values, depending on whether you want to show all of the data or only part of the data . Window defines what is to be viewed . What is viewport? An area on a display device to which a window Is mapped is called a viewport. The rectangular portion of the interface window that defines where the image will actually appear. Viewport defines where the window to be displayed .
If we are changing the position of window by keeping the viewport location constant, then the different part of the object is displayed at the same position on the display device. If we change the location of viewport then we will see the same part of the object drawn at different places on screen.
Window-to-Viewport Transformation Window-to-Viewport transformation is the process of mapping or transforming a two-dimensional, world-coordinate scene to device coordinates. In particular, objects inside the world or clipping window are mapped to the viewport. The clipping window is used to select the part of the scene that is to be displayed. The viewport then positions the scene on the output device .
Steps for Window to Viewport Transformation Step 1: Translate window towards origin. To shift window towards origin, translation factor will become negative (-tx,-ty). Step 2: Resize window to the size of view port. Step 3: Translate window (position of window must be same as position of view port).
Homogeneous Coordinates Being homogeneous means a uniform representation of rotation, translation, scaling and other transformations. Homogeneous coordinates are widely used in computer graphics because they enable effective, simple manipulations of transformations in a specific way.
Why Homogeneous? We have to use 3×3 transformation matrix instead of 2×2 transformation matrix. To convert a 2×2 matrix to 3×3 matrix, we have to add an extra dummy coordinate W. In this way, we can represent the point by 3 numbers instead of 2 numbers, which is called Homogenous Coordinate system. In this system, we can represent all the transformation equations in matrix multiplication. Any Cartesian point P(X, Y) can be converted to homogenous coordinates by P’ (X h , Y h , h).