Polygon clipping apart from being used in computer graphics can also be used in other areas. A practical example of this is road construction planning, where we use a map to draw a road on and the program draws a vehicle-shaped polygon at each point. When all the polygons are combined, we get an outline of the road, which is appropriately shaped and wide enough in turns with respect to the diagonal length of the vehicle. In order to obtain an accurate result in such planning, a large number of polygons must be combined to draw one section of the road. To solve this problem, we need a fast and reliable algorithm. For use in this and similar cases, it is necessary to make sure that the algorithm calculations can work on polygons of arbitrary shapes represented by sets of decimal coordinates.
|