Why it matters

Half-plane intersection solves LP-like problems. Understanding shapes geometric optimization.

Advertisement

The architecture

Sort half-planes by angle.

Add each; remove obsolete constraints.

Deque-based.

Half-plane intersectionSort half-planesby angleAdd + removeobsolete constraintsConvex polygonintersection regionDeque of active constraints; foundation for LP with 2 variables
Half-plane intersection.
Advertisement

How it works end to end

Sort by direction.

Deque active constraints.

Remove from back or front as needed.