Cases of the sutherland hodgman polygon clipping algorithm, Computer Graphics

Assignment Help:

Cases of the Sutherland Hodgman Polygon Clipping Algorithm

In order to clip polygon edges against a window edge we move from vertex Vi to the subsequent vertexVi+1 and choose the output vertex as per to four simple tests or rules or cases listed here in below:

Table: Cases of the Sutherland-Hodgman Polygon Clipping Algorithm

Case

Vi

Vi+1

Output Vertex

A

Inside window)

Inside

Vi+1

B

Inside

Outside

V'i   i.e  intersection of polygon and window edge

C

Outside

Outside

None

D

Outside

Inside

V'I  ; Vi+1

Conversely, the 4 possible Tests listed above to clip any polygon conditions are as mentioned here:

1) If both Input vertices are within the window boundary then only second vertex is added to output vertex list.

2) If first vertex is within the window boundary and the 2nd vertex is outside then, merely the intersection edge along with boundary is added to output vertex.

3) If both Input vertices are outside the window boundary then nothing is added to the output list.

4) If the first vertex is outside the window and the 2nd vertex is within window, then both the intersection points of the polygon edge along with window boundary and second vertex are added to output vertex list.

Here, we can utilize the rules cited above to clip a polygon properly. The polygon should be tested against each edge of the clip rectangle; new edges should be added and existing edges must be discarded, retained or divided. In fact this algorithm decomposes the problem of polygon clipping against a clip window in the same sub-problem where a sub-problem is to clip all polygon edges that is pair of vertices in succession against a particular infinite clip edge. The output is a set of clipped edges or pair of vertices which fall in the visible side along w.r.t. clip edge. Such set of clipped edges or output vertices are taken as input for the subsequent sub-problem of clip against the second window edge. Hence, identifying the output of the earlier sub-problem as the input, all of the sub-problems are solved in sequence, at last yielding the vertices which fall on or inside the window boundary. These vertices linked in order forms, the shape of the clipped polygon.


Related Discussions:- Cases of the sutherland hodgman polygon clipping algorithm

Color Histograms - Scene Categories, How can I perform feature extraction o...

How can I perform feature extraction on images of different classes? How to obtain a vector of each class that contains its features?

Hypertext/media and human memory, Hypertext/media and Human Memory Huma...

Hypertext/media and Human Memory Humans associate pieces of information along with other information and make complicated knowledge structures. Thus, this is also said as the h

Three dimensions, A triangle is having the vertices A(0,0) B(1,2) and C (5,...

A triangle is having the vertices A(0,0) B(1,2) and C (5,2).Magnify the triangle to thrice it''s size while keeping C(5,2) fixed

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

BINARY, WHAT THAT S MEANS 0001

WHAT THAT S MEANS 0001

Three-dimensional viewing, Three-Dimensional Viewing Three dimensional ...

Three-Dimensional Viewing Three dimensional objects are created using modelling coordinate system. The modelled objects are then placed in locations specified in the scene with

Ray tracing - polygon rendering and ray tracing methods, Ray Tracing - Poly...

Ray Tracing - Polygon Rendering and Ray Tracing Methods Basically Ray tracing is an exercise that is performed to attain the realism in a scene. In easy way Ray Tracing is a w

Jas file formats, JAS: The JAS file formats were implemented to form the s...

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

Explain the working of animators, Explain the working of Animators Anim...

Explain the working of Animators Animators want to create a human image that moves and interacts with its background in such a way that viewers can't tell if a specific scene i

web design and editing, Web Design and Editing To edit and make a webs...

Web Design and Editing To edit and make a website, the big three softwares are use: 1)   DreamWeaver (MacroMedia) 2)   Frontpage (MicroSoft) 3)   Go Live (Adobe) 4)

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