Non trivial case of cohen sutherland line clippings, Computer Graphics

Non Trivial Case of cohen sutherland line clippings

Case: assume for the line segment PQ, both the trivial rejection and acceptance tests failed (that is, Case 1 and Case 2 situation do not hold, i.e. the case for l3, l4 and l5 line segments) demonstrated above in Figure. For these non-trivial Cases the algorithm is processed, as given below.

Because, both the bit-codes for the end points P, Q of the line segment cannot be equivalent to 0000.  Assume that the beginning point of the line segment is P those bit-code is not equivalent to 0000. For illustration, for the line segment l5 we decide P to be the bit codes 1001. Here, scan the bit-code of P from the first bit to the 4th bit and determine the position of the bit at that the bit value 1 appears at the first time. For the line segment line 5 it appears at the extremely first position. If the bit value 1 happens at the first position then proceed to intersect the line segment along with the UP edge of the window and allocate the first bit value to its point of intersection like 0. Likewise, if the bit value 1 arises at the second position while scanning the bit values at the initial time then intersect the line segment PQ along with the Down edge of the window. This point of intersection might be labeled as P'. Obviously the line segment PP' is outside the window and hence rejected and the original line segment considered for dipping will be P'Q. The coordinates of P' and its keeping new bit values are calculated. Here, by taking P as P', again we have the new line segment PQ that will again be referred to Case 1 for clipping.

926_non-trivial Case of cohen sutherland line clippings.png

Figure: Line Clipping - Geometrically

Posted Date: 4/3/2013 3:02:36 AM | Location : United States







Related Discussions:- Non trivial case of cohen sutherland line clippings, Assignment Help, Ask Question on Non trivial case of cohen sutherland line clippings, Get Answer, Expert's Help, Non trivial case of cohen sutherland line clippings Discussions

Write discussion on Non trivial case of cohen sutherland line clippings
Your posts are moderated
Related Questions
QUESTION (a) People want to know design patterns. i) What should their attitude be about design patterns? ii) How can people use design patterns to do a better job?

Modelling and Rendering a surface Common practice in modelling and rendering a surface is to approximate it by a polygonal surface.  By a polygonal surface we mean a surface whi

De Casteljau Algorithm For computation of Bézier curves an iterative algorithm known as de Casteljau algorithm is used.  The algorithm uses repeated linear interpolation.

1. What is the purpose behind the Staircase effect? Ans. The approximation concerned in the calculation for finding of pixel position concerned in the display of lines and th

differentiate between dda and bresenhams line algorithm

What do you mean by parabolic splines?  For parabolic splines a parabola is fitted by the first three points p1, p2,p3 of the data array of kot points. Then a second parabolic

Windowing Transformations - Raster Graphics and  Clipping From the above section of introduction, we understood the meaning of the viewport and term window that could again be

Engineering: CAD has always been an imperative tool in industry. For illustration in automobile design, CAD could be utilized to model a car. Although with the advent of computer

QUESTION 1 (a) Write a run method in Image J environment for the following cases Contrast and Brightness Histogram Generation Histogram Equalisation   (b)

Perspective Distortion - Polygon Rendering and Ray Tracing Methods Anomalies are introduced since interpolation is performed after perspective transformation in the 3-D scree