Cohen sutherland line clippings algorithm, Computer Graphics

Assignment Help:

Cohen Sutherland Line Clippings Algorithm

The clipping problem is identified by dividing the region surrounding the window area into four segments Up as U, Down as D, Left as L, Right as R and assignment of number 1 and 0 to respective segments assists in positioning the area surrounding the window. How this positioning of areas is performed can be well determined by understood in following figure.

2465_Cohen Sutherland Line Clippings Algorithm.png

Figure: Positioning of regions surrounding the window

In figure as given above we have noticed that each coding of areas U, D, L and R is done along w.i.t. window region. Since window is neither Left nor Right, neither up nor down so, the respective bits UDLR are 0000; currently see area1 of above figure. The positioning code UDLR is 1010, that is the area1 lying on the position that is upper left side of the window. Hence, area1 has UDLR code 1010 i.e. Up so U=1, not Down so D=0, Left so L=1, not Right so R=0.

The sense of the UDLR code to identify the location of region w.i.t. window is:

1st bit ⇒ Up(U) ; 2nd bit ⇒ Down(D) ;3rd bit ⇒ Left(L) ;  4th bit ⇒ Right(R),

Currently, to perform Line clipping for different line segment that may reside within the window region partially or fully, or may not even lie in the widow area; we utilize the tool of logical ANDing among the UDLR codes of the points lying on the line.

Logical ANDing (^) operation

=>

1 ^ 1 = 1; 1 ^ 0 = 0;

between respective bits implies

 

Note:

 

0 ^ 1 = 0; 0 ^ 0 = 0

 

  • UDLR code of window is 0000 all the time and with respect to this will generate bit codes of other areas.
  • A line segment is observable if both the UDLR codes of the end points of the line segment equal to 0000 that is UDLR code of window area. If the resulting code is not 0000 then, which line segment or section of line segment may or may not be observable

Related Discussions:- Cohen sutherland line clippings algorithm

Find out projection matrix for oblique projection, Find Out Projection Matr...

Find Out Projection Matrix for Oblique Projection To find out projection matrix for oblique projection, we want to find out the direction vector d. Because vector PP' and vect

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

Multimedia resources, Education courses, skills, and knowledge are sometime...

Education courses, skills, and knowledge are sometimes taught of context because of lack of application of real time examples. To resolve this, educators are using multimedia to br

Types of touch panels - input and output devices, Types of Touch panels ...

Types of Touch panels 1) Electrical TSS: Wire grid or the other conductive coating is utilized to specify a voltage drop at the point touched point from that the position ma

Remark for perspective projection - transformation, Remark for Perspective ...

Remark for Perspective projection - Transformation A Perspective projection can have at most three Principle Vanishing points and at any rate one Principle vanishing point. To

Translation - 2-d and 3-d transformations, Translation - 2-d and 3-d Transf...

Translation - 2-d and 3-d Transformations It is the process of changing the position of an object. Suppose an object point P(x,y)=xI+yJ be moved to P'(x',y') by the specified

Archeology-applications for computer animation, Archeology: along with the...

Archeology: along with the advent of the computer, the archeologist has obtained a new tool, computer animation. An object-model can be made comparatively quick and without any we

Image classification, The image classification is the process to categorize...

The image classification is the process to categorize images into one of several classes or categories. In this project, there are seven categories (Piano, Kangaroo, Strawberry, Su

Types of basic tools of multimedia, Types of Basic Tools Different typ...

Types of Basic Tools Different types of basic tools for creating and editing multimedia components are: Drawing and Painting tools Image editing tools OCR softwar

Polygon -rendering methods, Polygon -Rendering Methods Now we will see...

Polygon -Rendering Methods Now we will see the application of an illumination model to execute the rendering of standard graphics objects that are formed along with polygonal

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