Clipping: When a polygon P is clipped against a rectangular window, a new polygon CP is obtained, which may have a more or fewer vertices than P.
If P is a triangle, how many vertices will CP have, at most?
If P is a quadrilateral, how many vertices will CP have, at most? (P could be non-convex!)
If P is convex and has n>4 vertices, how many will CP have, at most?
If P is convex and has n>4 vertices, how many will CP have, at LEAST? (Assume P is not trivially clipped, i.e., part of P is wholly inside the window and part is wholly outside).
Answer a
Maximum vertices in CP can be achieved when P is overlapping to all sides of rectangle. Answer is 7
Answer b
Maximum vertices in CP can be achieved when quadrilateral P is overlapping to all sides of rectangle. Answer is 8
Answer c
Maximum vertices in CP can be achieved when convex P is overlapping to all sides of rectangle. Answer is n+4
Answer d
Minimum vertices in CP can be achieved when convex P is overlapping to only two sides of rectangle. Answer is 3
Get Answers For Free
Most questions answered within 1 hours.