Cases of the sutherland hodgman polygon clipping algorithm, Computer Graphics

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.

Posted Date: 4/3/2013 3:48:19 AM | Location : United States







Related Discussions:- Cases of the sutherland hodgman polygon clipping algorithm, Assignment Help, Ask Question on Cases of the sutherland hodgman polygon clipping algorithm, Get Answer, Expert's Help, Cases of the sutherland hodgman polygon clipping algorithm Discussions

Write discussion on Cases of the sutherland hodgman polygon clipping algorithm
Your posts are moderated
Related Questions
Explore and understand light field. Checking out one of the image libraries. 1. You can modify existing source code, or develop your own to achieve light field rendering; 2.

Plane Equation - Curves and Surfaces Plane is a polygonal surface that bisects its environment in two halves. One is termed to as forward and another as backward half of som

Curve segment - properties of bezier curves Note : 1) The joining point on the curve along w.r.t. the parameter based upon second derivates of Q(t) is the acceleration. Wh

Persistence (of phosphor) - Display devices Time it takes the emitted light from screen to decay to one-tenth of its original intensity. The point where an electron gun strikes

Algorithms for Basic Line Segment Plotting There are two important algorithms for basic line segment plotting-DDA algorithm and Bresenham algorithm.  Both the algorithms use th

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

Rigid body or Non-Rigid body Transformations 2D transformations can be classified as rigid body or non-rigid body transformations. Rigid body transformations keep the shape and

Important Points for Windowing Transformations 1. Window explains what is to be viewed and viewpoint describes where it is to be displayed. 2. Frequently window and viewpoi

Define clipping and covering (exterior clipping)? Clipping is the process of cutting a graphics display to neatly fit a predefined graphics region or the view port.  This is

What is a Blobby object?  Some objects do not handle a fixed shape, but change their surface characteristics in sure motions or when in proximity to other objects. That is call