next up previous contents
Next: Scope for Improvement Up: Polygon Clipping Previous: Implementation

Efficiency

The complexity of the intersection calculations is always O(M N) where M and N are the number of vertices of the CP and SP respectively. The complexity of the polygon clipping problem for a non-special case is in the worst case O(M N). For disjoint CP and SP, the intersection algorithm checks for bounding boxes and hence is more efficient. For special cases, the complexity may be worse due to the overheads involved in their detection. [4]



Anirudh Modi
4/15/1998