Recursive half-space clipping of a subdivision curve (source code)

= Recursive half-space clipping of a subdivision curve

For an oriented plane function $\ell$, certified extrema over a <bounding volume> allow a <subdivision curve> piece to be rejected when $\max\ell<0$, or wholly retained when $\min\ell\geq0$. Otherwise subdivide. At an explicitly chosen rendering tolerance, a sufficiently flat, sufficiently short piece can be replaced by its clipped chord. This is an approximation, not a proof of exact crossing topology. Exact treatment of tangent contacts and small excursions requires root isolation of $\ell(C(t))$ and splitting into sign-constant intervals, when the curve representation supports such isolation.