Sutherland cohen line clipping algorithm, Computer Graphics

Assignment Help:

Describe briefly Sutherland Cohen line clipping algorithm.   OR   Describe Cohen Sutherland line clipping algorithm.

Cohen Sutherland line clipping algorithm In this algorithm we divide the line clipping process into two phases: (1) identify those lines which intersect the clipping window and so need to be clipped and (2) perform the clipping. 

1. Visible: Both endpoints of the line lie within the window. 

2. Not visible: The line definitely lies outside the window. 

3. Clipping candidate: The line is in neither category 1 nor 2. In fig. 1 line AB is in category; line CD and EF are in category 2; and lines GH, IJ, and KJ are in category 3 (clipping candidate).  The algorithm employs an efficient procedure for finding the category of line. It proceeds in two steps:  1. Assign a 4-bit region code to each endpoint of the line. The code is determined according to which of the following nine regions of the plane the endpoint lies in starting from the leftmost bit, each bit of the code is set to true (1) of false (0) according to the scheme We rse the convention that sign (a) = 1 if a is positive, 0 otherwise. Of course, a point with code 0000 is inside the window.  2. The line is visible if both region codes are 0000, and not visible if the bitwise logical AND of the codes is not 0000, and a candidate for clipping if the bitwise logical AND of the region codes is 0000. For a line in category 3 we proceed to find the intersection point of the line with one of the boundaries of the clipping window, or to be exact, with the infinite extension of one of the boundaries. We choose an endpoint of the line say (x1,y1,) that is outside the window, i.e., whose region code is not 0000. We then select an extended line by observing that boundary lines that are candidates for intersection are the ones for which the chosen endpoint must be "pushed across" so as to change a "1" in its code to a "0". Consider line CD in fig. If endpoint C chosen, then the bottom boundary line y = y is selected for computing intersection. On the other hand if endpoint D is chosen, then either the top boundary line y = y of the right boundary line x = x is used. Now we replace endpoint with the intersection point effectively eliminating the portion of the original line that is on the outside of the selected window boundary. The new endpoint is then assigned an update region code and the clipped line re categorized and handled in the same way . This iterative process terminates when we finally reach a clipped line that belongs to either category 1 (visible ) of category 2 ( not visible ). 


Related Discussions:- Sutherland cohen line clipping algorithm

Key frames -traditional animation techniques, Key Frames -Traditional Anima...

Key Frames -Traditional Animation Techniques The senior artists go and draw the main frames of the animation, after a storyboard has been laid out. These main frames are frame

Z- buffer algorithm, Q.   Describe the z- Buffer algorithm for hidden surfa...

Q.   Describe the z- Buffer algorithm for hidden surface removal. Ans. Z- buffer method: This method compares surface depths at each pixel position on the projection plane. T

How to identify window area - raster graphics and clipping, A convex polygo...

A convex polygonal region having n- vertices {P 0 , P 1 , P 2 ..., P n - 1 , P n , P 0 } or lattice points to be identified by the user includes the convex window area. To be exact

Scan conversion, State the purpose of scan conversion , along with the side...

State the purpose of scan conversion , along with the side effects

What do you mean by scan conversion, What do you mean by scan conversion?  ...

What do you mean by scan conversion?  A main task of the display processor is digitizing a picture definition given in an application program into a set of pixel-intensity valu

What is an axonometric orthographic projection, What is an axonometric orth...

What is an axonometric orthographic projection and cabinet projection? The orthographic projection can show more than one face of an object.  Such an orthographic projection i

Various cases of cohen sutherland line clippings - algorithm, Various cases...

Various cases of Cohen Sutherland Line Clippings Currently, we study how this clipping algorithm works. For the sake of simplicity we will tackle all the cases with the assist

Disadvantages of the z-buffer method, Disadvantages : 1)   Doubles memor...

Disadvantages : 1)   Doubles memory needs, one for at least z-buffer and one for refreshes- buffer. 2)   Dependency of device and memory intensive. 3) Wasted calculation u

Write short notes on rendering bi-cubic surface, Write short notes on rende...

Write short notes on rendering bi-cubic surface patches of constant u and v method?  The simple way is to draw the iso-parmetric lines of the surface. Discrete approximations t

Education and training systems multimedia in education, Education and train...

Education and training systems are making with three major objectives as: a) The learning objectives and purpose of the training. b)  Assessment or testing of the students to

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd