Polygon or Area Clipping Algorithm - Sutherland-Hodgman Algorithm
There are different algorithms as Liang-Barsky, Line clipping, Weiler-Atherton Polygon Clipping, which are fairly efficient in performing the job of clipping images. Although we will limit our discussion to the clipping algorithms declared previous.
Before going get any further details of point clipping, here we look at several basic terminologies utilized in the field of clipping, as viewport and window.
- Window may be explained as the world coordinate region selected for display.
- Viewport may be explained as the region on a display device on that the window is mapped.
Consequently, it is the window that identifies what is to be displayed or shown whereas viewport identifies where it is to be shown or displayed.
Identifies these two coordinates:
Window and viewport coordinates and also the transformation from window to viewport coordinates are extremely necessary from the point of view of clipping.