Non trivial case of cohen sutherland line clippings, Computer Graphics

Assignment Help:

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


Related Discussions:- Non trivial case of cohen sutherland line clippings

Advantages of gif files, Advantages of GIF Files GIF is the most ex...

Advantages of GIF Files GIF is the most extensively supported graphics format upon the Web. GIFs of diagrammatic images appear better than JPEGs. GIF maintains inte

What do you understand by the term image compositing, Question 1: (a) E...

Question 1: (a) Explain in detail what you understand by the term image compositing and where it is more often used? (b) You are given 3-5 images to make a photo montage/ima

Design a game using graphical user interface, BlackJack is a popular card g...

BlackJack is a popular card game played in many casinos. The player plays against the dealer aiming to reach 21 points, or a score higher than the dealer without exceeding 21. The

Polygon tables - curves and surfaces, Polygon Tables - curves and surfaces ...

Polygon Tables - curves and surfaces All polygons are analogous to a graph G (V, E). Remember that the analogy in which a polygon surface can be specified along with as a set

Fill in the blanks, a__________of a scene is apart of a scene by which rela...

a__________of a scene is apart of a scene by which relate one part of the scene with the other parts of the scene

Sound editing programs, Sound Editing Programs; Sound editing tools for bo...

Sound Editing Programs; Sound editing tools for both digitized and MIDI sound; by that you see music and also hear it. Through drawing a representation of a sound in fine growths,

Dv encoder types, DV Encoder Types: While DV is captured in a computer thi...

DV Encoder Types: While DV is captured in a computer this is stored in an AVI file, that is Microsoft's standard file format used for video files. Video support in Windows is prov

Sound and audio, Sound and Audio: Sound is a mechanical energy distur...

Sound and Audio: Sound is a mechanical energy disturbance which propagates by matter as a wave. Sound is characterized through the various properties that are: frequency, per

Differentiate between a raster image and vector image, Question: (a) D...

Question: (a) Describe in details the meaning of the following terms often available in drawing tools: (i) Welding objects; (ii) Trimming objects; (iii) Intersecting obje

Computer Animation, Computer Animation The term Animation is derived fr...

Computer Animation The term Animation is derived from 'animate' that literally means 'to give life to', 'Animating' a thing implies to impart movement to something that can't m

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