Line Clipping
Modify end points of lines to lie in rectangle
Method:
- Is end-point inside the clip region? - half-plane tests
- If outside, calculate intersection between the line and the clipping rectangle and make this the new end point
- Both endpoints inside: trivial accept
- One inside: find intersection and clip
- Both outside: either clip or reject (tricky case)