Sutherland hodgeman polygon clipping algorithm, Computer Graphics

Assignment Help:

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.  


Related Discussions:- Sutherland hodgeman polygon clipping algorithm

Three sub-fields of computer simulation, Three Sub-Fields of Computer Simul...

Three Sub-Fields of Computer Simulation Computer simulation is the electronic equivalent of this kind of role playing and it functions to drive synthetic environments and virt

Radiosity - polygon rendering & ray tracing methods, Radiosity - Polygon Re...

Radiosity - Polygon Rendering & Ray Tracing Methods Radiosity simulates the diffuse propagation of light begin at the light sources. Because global illumination is an extremel

Two modes of operation of tablets - cad and cam, Two Modes of Operation of ...

Two Modes of Operation of Tablets Tablets typically sustain two modes of operation as: 1)  Digitizer Mode: creates a one-for-one connection between screen and tablet.

Area subdivision method-obscures the continuing two surface, Assume here ar...

Assume here are three polygon surfaces P,Q, R along with vertices specified by as: P: P1(1,1,1), P2(4,5,2), P3(5,2,5) And as Q: Q1(2,2,0.5), Q2(3,3,1.75), Q3(6,1,0.5) R: R1(0.5,

Compression methods utilized for digital video, Compression methods utilize...

Compression methods utilized for digital video can be categorized in three major groups: General reason compression techniques can be utilized for any type of data. Intr

Graphics programming, Explain rubber-band interactive picture technique

Explain rubber-band interactive picture technique

Determine the advantages of raster-scan systems, Determine the advantages o...

Determine the advantages of raster-scan systems (i)  Rasterisation is now performed faster since a special purpose processor is used. (ii)  The CPU is not slowed down by the

3-d modeling and animation tools, 3-D Modeling and Animation Tools: By 3-D...

3-D Modeling and Animation Tools: By 3-D modeling software, objects rendered in perspective show more realistic. One can produce stunning scenes and wander by them, choosing just

Global illumination model -polygon rendering, Global illumination model -po...

Global illumination model -polygon rendering This illumination model adds to the local model the light which is reflected from the other surfaces to the current surface. This

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