Sutherland hodgeman polygon clipping algorithm, Computer Graphics

What is clipping? Explain Sutherland Hodgeman polygon clipping algorithm with example.  OR Write the algorithm for Sutherland Hodgeman Polygon. Beginning with the initial set of polygon vertices, we could first clip the polygon against the left rectangle boundary to produce a new sequence of vertices. The new set of vertices could then be successively passed to a right boundary clipper a bottom boundary clipper and a top boundary clipper as in Fig. 1. At each step a new sequence of output vertices is generated and passed to the next window boundary clipper. There are four possible cases when processing vertices in sequence around the perimeter of a polygon. As each pair of adjacent polygon vertices is passed to a window boundary clipper we made the following tests: (1) If the first vertex is outside the window boundary and the second vertex is inside, both the intersection point of the polygon edge with the window boundary and the second vertex are added to the output vertex list. (2) If both input vertices are inside the window boundary, only the second vertex is added to the output vertex list. (3) If the first vertex is inside the window boundary and the second vertex is outside. Only the edge intersection with the window boundary as added to the output vertex list. (4) If both input vertices are outside the window boundary, nothing is added to the output list. These four cases are illustrated in Fig. 2 successive pairs of polygon vertices. Once all vertices have been processed for one clip window boundary, the output list of vertices is clipped against the next window boundary. We illustrate this method by processing the area in Fig. 3 against the lift window boundary. Vertices 1 and 2 are found to be on the outside of the boundary. Moving along t vertex 3 which is inside we calculate the intersection and save both the intersection point and vertex 3. Vertices 4 and 5 are determined to be inside and they are also saved. The sixth and final vertex is outside so we find and save the intersection point. Using the five saved points, we would repeat the process for the next window boundary. Implementing the algorithm as we have just described requires setting up storage for an output list of vertices as a polygon is clipped against each window boundary. We can eliminate the intermediate output vertex lists by simply clipping individual vertices at each step and passing the clipped vertices onto the next boundary clipper. This can be done with parallel processors or a single processor and a pipeline of clipping routines. A point is added to the output vertex list only after it has been determined to be inside of on a window boundary by all four boundary clippers. Otherwise, the point does not continue in the pipeline. Figure 4 below shows a polygon and its intersection points with a clip window. In Fig. 4 we illustrate the progression of the polygon vertices in Fig. 3 through a pipeline of boundary clippers. The following procedure demonstrates the pipeline clipping approach. An array, s, records the most recent point that was clipped for each clip window boundary. The main routine passes each vertex p to the clip point routine for clopping against the first window boundary. If the line defined by endpoints  p and s crosses this window boundary, the intersection is calculated and passed to the next clipping stage. Any point that survives clipping against all window boundaries is then entered into the output array of points. The array first point stores for each window boundary the first point clipped against that boundaries. After all polygon vertices have been processed, a closing routine clips line defined by the first and last points clipped against each boundary.  

Posted Date: 7/1/2012 6:36:50 AM | Location : United States

Related Discussions:- Sutherland hodgeman polygon clipping algorithm, Assignment Help, Ask Question on Sutherland hodgeman polygon clipping algorithm, Get Answer, Expert's Help, Sutherland hodgeman polygon clipping algorithm Discussions

Write discussion on Sutherland hodgeman polygon clipping algorithm
Your posts are moderated
Related Questions
What is the maximum number of objects such can be handled via the depth/z- buffer algorithm? Solution : In z-buffer algorithm, an arbitrary number of objects can be handled sin

what is region filling? give details

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

Question) Compute the following:  a) Size of 420 × 300 image at 240 pixels per inch.  b) Resolution (per square inch) of  3 ×  2 inch image that has  768×512 pixels.  c) H

Applications of Ray Tracing Thus, you might ask, just what practical utilizes does ray tracing have: a) For vision research, simulation of real-world phenomena, b) Medica

Adobe flash - Softwares for computer animation Formerly, it was termed as Macromedia flash and prior to this, this was Futuresplash. This is in fact an IDE that refers to both

Example 1 : Determine the number of memory bits essential for three bit plane frame buffer for the 512 x 512 raster Solution: Whole memory bits needed are 3 x 512 x 512 = 786,

Hypertext: it is conceptually very similar as regular text: it can be stored, searched, read, or edited along with a significant difference: hypertext is text along with pointers

examples and equation of reflection

BlackJack is a popular card game played in many casinos. The player plays against the dealer aiming to reach 21 points, or a score higher than the dealer without exceeding 21. The