Sutherland-Hodgeman Polygon Clipping Algorithm

  1. Read coordinates of all vertices of the Polygon.
  2. Read coordinates of the dipping window
  3. Consider the left edge of the window
  4. Compare the vertices of each edge of the polygon, individually with the clipping plane.
  5. Save the resulting intersections and vertices in the new list of vertices according to four possible relationships between the edge and the clipping boundary.
  6. Repeat the steps 4 and 5 for remaining edges or the clipping window. Each time the resultant list of vertices is successively passed to process the next edge of the clipping window.
  7. Stop.

Example:

For a polygon and clipping window shown in figure below give the list of vertices after each boundary clipping.

Solution:

Original polygon vertices are V1, V2, V3, V4, and V5. After clipping each boundary the new vertices are as shown in figure above.

Hidden Surface Elimination

  1. One of the most challenging problems in computer graphics is the removal of hidden parts from images of solid objects.
  2. In real life, the opaque material of these objects obstructs the light rays from hidden parts and prevents us from seeing them.
  3. In the computer generation, no such automatic elimination takes place when objects are projected onto the screen coordinate system.
  4. Instead, all parts of every object, including many parts that should be invisible are displayed.
  5. To remove these parts to create a more realistic image, we must apply a hidden line or hidden surface algorithm to set of objects.
  6. The algorithm operate son different kinds of scene models, generate various forms of output or cater to images of different complexities.
  7. All use some form of geometric sortingto distinguish visible parts of objects from those that arehidden.
  8. Just as alphabetical sorting is used to differentiate words near the beginning of the alphabet from those near the ends.
  9. Geometric sorting locates objects that lie near the observer and are therefore visible.
  10. Hidden line and Hidden surface algorithms capitalize on various forms of coherence to reduce the computing required to generate an image.
  11. Different types of coherence are related to different forms of order or regularity in the image.
  12. Scan line coherence arises because the display of a scan line in a raster image is usually verysimilar to the display of the preceding scan line.
  13. Frame coherence in a sequenceof images designedto show motion recognizes thatsuccessive frames are very similar.
  14. Object coherence results from relationships betweendifferent objects or between separateparts of the same objects.
  15. A hidden surface algorithmis generally designedto exploit one or more of these coherence properties to increase efficiency.
  16. Hidden surfacealgorithm bears a strong resemblance to two-dimensional scan conversions.