Cohen-Sutherland Algorithm: Subdivision
If neither trivial accept nor reject:
- Pick an outside endpoint (with nonzero outcode)
- Pick an edge that is crossed (nonzero bit of outcode)
- Find line's intersection with that edge
- Replace outside endpoint with intersection point
- Repeat until trivial accept or reject
Other clipping algorithms
- Cyrus-Beck/Liang-Barksy or Nicholl-Lee-Nicholl - see the textbook