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
Anti- aliasing: Most aliasing artifacts, when appear in a static image at a moderate resolution, are often tolerable, and in many cases, negligible. However, they can have a signi

Three Dimensional Concepts and Display Methods   Imagine yourself taking a picture by a camera.  What do you normally do?  You specify a viewpoint and view direction and then s


Given two triangles P along with vertices as P1(100,100,50), P2(50,50,50), P3(150,50,50) and q along with vertices as Q1(40,80,60), q2(70,70,50), Q3( 10,75,70), determine that tria

QUESTION 1. You are a consultant in the field of video production and video editing. You haven been requested to participate in a debate over analog and digital video. Write

Spline curve - Modeling and Rendering Spline curve is created by using Control points that control the shape of the curve Spline curve is a composite curve formed along with s

Step1:  Read a text file which we want to hide. Step2:  Transform it into an array of its binary value. Step3: Transform this array into its equivalent one dimensional array

Education - applications for computer animation Currently, studies of subjects as Art, Physics, Maths, Chemistry, Biology, Engineering, Medicine, and Technology are fairly simp

Problem: (a) What is meant by ‘Time - Stretching ‘in relation to a sound data file? (b) Calculate the size of a 5 minutes mono sound file of CD quality and with a 16 -bit

Display Devices - Graphics Hardware Since the importance of output and input devices has been discussed over, so let us now focus our discussion particularly on display dev