Wednesday, June 19, 2019

2D Viewing & Clipping in computer graphics

2D Viewing & Clipping in computer graphics




Much like what we see in real life what we see in real life through a small window on the wall of or the view finder of a camera. A computer-generated image often depicts a particle view of a large screen. Object are placed into the scene by module transformation to a master coordinate system a rectangle area with its edge parallel to the axis of WCS is used to select the portion of the scene. This rectangle area is called window sometime an additional system (VCS) is introduced to simulate the effect of the moving of the camera.

polygon clipping in computer graphics  clipping in computer graphics ppt  exterior clipping in computer graphics  types of clipping  2d viewing pipeline in computer graphics notes  2d transformation in computer graphics  liang barsky line clipping algorithm  window to viewport transformation

The Viewing Pipe Line: -

In Computer Graphics the term window is referred as an area of a picture that is selected for viewing once object is described for viewing, display on the frame.
To maintain the same reflective co-ordinate in the view port as in the window we required that
     1. Xv - Xvmin / Xvmax - Xvmin  = Xw – Xwmin / Xwmax - Xwmin
     2. Yv – Yvmin / Yvmax – Yvmin = Yw – Ywmin / Ywmax – Ywmin


The Viewing Pipe Line




A window is specified by four coordinate Wxmin , Wxmax , Wymin and Wymax similarly a view port is described by four normalized device coordinate Vxmin , Vxmin , Vymin & Vymax.

Once object describe have been transformed to the view with the help of reference window. The reference window is described further four points for viewing the clipped image with the equation (1) & (2) we can solve the position Xv , Yv we have
                Xv = Xvmin + (Xwmax - Xwmin)Sx
Where  Sx = Xvmax – Xvmin / Xwmax – Xwmin
Similarly, Yv = Yvmax + (Ywmax – Ywmin)Sy
                   Sy = Yvmax – Yvmin / Ywmax – Ywmin

No comments:

Post a Comment