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 1. Describe two methods for converting 16x9 widescreen movie to 4x3. 2. Explain clearly the difference between File Format and Codec. 3. What is a video transiti

Implement the Scan line polygon fill algorithm for any arbitrary polygon in C-language and then use your code to fill each of the following type of polygon. i)  Convex polygon

Transformation for 3-D Rotation Rotation in 3-dimensions is considerably more complicated then rotation in 2-dimensions. In 2-Dimentional, a rotation is prescribed via an angl

Matrix for Orthographic Projection Orthographic projections are projections into one of the coordinate planes x=0, y=0or z=0. The matrix for orthographic projection on the z=0

QUESTION (a) Describe the following Mean Filters used as Noise Reduction filters: 1. Arithmetic Mean Filter. 2. Geometric Mean Filer. 3. Harmonic Mean Filter. You a

What is a spline?  To produce a smooth curve by a designed set of points, a flexible strip called spline is used. Like spline curve can be mathematically explained with a piece

JAS: The JAS file formats were implemented to form the smallest possible picture files for 24bits per pixel image and 8 bit per pixel gray scaled pictures. This uses a discrete co

Space Exploration: now, the farthest point far away from earth which the human was on the moon, although we continually want to learn more. A trip by a human to the other planet w

Types of Light Resources - illumination Model Let us discuss about the types of light resources. The light sources can not merely be natural like light from Sun or Moon or Sta

What are the various representation schemes used in three dimensional objects?  Boundary representation (B-res) - explain the 3 dimensional objects as a set of surfaces that se