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

What is raster scan display, What is  Raster Scan Display A raster sca...

What is  Raster Scan Display A raster scan display device using CRT on the other hand directs the electron beam across the screen, one row at a time from top to bottom. In a ra

Containment test - visible surface detection, Containment Test -  visible s...

Containment Test -  visible surface detection Test: That is Containment test: it can be either comprised (contained) or surrounding polygon, if intersection test fails. The

Illustrate the advantages of using virtual reality, Illustrate the Advantag...

Illustrate the Advantages of using virtual reality - it's safer (As techniques can be tried out in advance without the dangers of real operation for example maintaining a nucle

Subdivision of polygon - visible surface detection , Subdivision of polyg...

Subdivision of polygon Test to find out the visibility of a single surface are made through comparing surfaces that as polygons P along regarding a specified screen area A.

Amiga - hardware for computer animation, Amiga - Hardware for computer anim...

Amiga - Hardware for computer animation Originally owned through Commodore, Amiga computers have conduct a position in the computer animation industry for many years. This is

Text generation and character generation techniques, Write short notes on T...

Write short notes on Text generation.   OR Character Generation Techniques  Character Generation Techniques   Two different representations are used for storing computer fon

Translate a square - 2-d and 3-d transformations, Example1: Translate a sq...

Example1: Translate a square ABCD along with the coordinates as: A(0,0),B(5,0),C(5,5),D(0,5) via 2 units in x-direction and 3 units in y-direction. Solution: We can show the

Time delay and busy flag method, 1. Using a time Delay Method The delay...

1. Using a time Delay Method The delay required between issuing each character to the LCD is about 5-10ms (it's simply known as DELAY). When programming an LCD, a long delay is

BINARY, WHAT THAT S MEANS 0001

WHAT THAT S MEANS 0001

Polygon representation methods - boundary representations, Polygon represen...

Polygon representation methods - Boundary representations Boundary representations: now the 3-D object is shown as a set of surfaces which separate the object interior from

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