written 8.3 years ago by | modified 2.8 years ago by |
Mumbai university > Comp > SEM 4 > Computer Graphics
Marks: 10M
Year: May 2014 , Dec 2014
written 8.3 years ago by | modified 2.8 years ago by |
Mumbai university > Comp > SEM 4 > Computer Graphics
Marks: 10M
Year: May 2014 , Dec 2014
written 8.3 years ago by |
Window:
The space in which the object is described is called as world coordinate.
World coordinate area selected for display is called as window.
Window is rectangular portion through which we can see scene.
It is an opening through which we see a portion of the world that exist outside.
In window we have limitation of scene specified by the boundary of the windows.
The window world specifies which part of the world should be drawn: whichever part lies inside the window should be drawn, and whichever part lies outside should be clipped away and not drawn.
OpenGL does the clipping automatically.
Viewport:
It may happen that we may not use entire screen for display.
We just want some part of screen to display the image.
So we will form a rectangular box on screen and in that box only we will display the image.
This box is called as viewport.
Window to view point transformation:
i. Window to view transformation is also called as viewing transformation.
ii. The viewing transformation is a process of three steps.
Step 1: Translation
The object with its window is translated until the lower left corner of the window matches to the origin. As shown in figure 21.
Step 2: Scaling
The object and the window are now selected until the window has the dimension same as viewport. In other words we are converting window into viewport. Refer figure 22.
Step 3: Translation
Now perform another translation to move the viewport to its correct position on the screen as shown in figure 23.
In reality we use scaling to map window to viewport and translation to place viewport properly on screen.