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

Computer science, what do you means by bresenham s him algorithm

what do you means by bresenham s him algorithm

Do we have need of to generate full circumference of circle, 1.   Do we hav...

1.   Do we have need of to generate the full circumference of the circle utilizing the algorithm or  can we can produces it in a quadrant or octant only and after that utilization

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

Constant intensity shading or flat shading, Constant intensity shading OR F...

Constant intensity shading OR Flat shading  In this technique particular intensity is calculated for each polygon surface that is all points that lie upon the surface of the

Briefly explain types of animation, Question 1 Briefly explain types of an...

Question 1 Briefly explain types of animation Question 2 Briefly explain steps involved in animation process Question 3 What is Layout? Explain two types of layout

Dissimilarity between the printer and the plotter, Dissimilarity between th...

Dissimilarity between the Printer and the Plotter 1)  Plotters print their output through moving a pen across the surface of paper's piece. It implies that plotters are lim

Compute the negative of the image, Obtain an MRI image using the Open Sourc...

Obtain an MRI image using the Open Source internet resources. i. Read the image into Scilab ii. Plot the image iii. Covert it into grayscale image and plot it iv. Find/

Plasma panel - raster graphics and clipping, Plasma Panel - Raster Graphics...

Plasma Panel - Raster Graphics and Clipping This is an inherent memory device. Images can be written into the surface point by point and they keep stable, without flicked for

Translate a triangle and scale it in coordinate direction, Translate a tria...

Translate a triangle and scale it in each coordinate direction Consider a triangle with vertices in 2D plane given by (0, 0), (1, 0) and (0,1) (called unit triangle).  Translat

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