Solution (source code)

= Solution

A <subdivision curve> should support <subdivision curve interrogation> rather than merely supply successively larger <control polygons>. Its interface should provide the parameter interval, orientation and open/closed status; endpoint and limit-point evaluation to a prescribed accuracy; and <tangent vector> or derivative evaluation where defined. It should be possible to split a parameter interval, commonly at its midpoint, into equivalent restricted curve definitions while retaining all neighboring controls needed by the refinement rule.

For geometric algorithms, request a certified <bounding volume> for each restricted curve, such as a <convex hull> or an <axis-aligned bounding box>, and the minimum and maximum of a plane's linear function over that bound. Request also a certified flatness bound: the maximum distance of the restricted limit curve from its endpoint chord, together with its spatial extent. These allow safe rejection, adaptive drawing and accuracy control. A positive, constant-reproducing <subdivision mask> often makes a control-point <convex hull> a valid bound. With negative mask coefficients this must be proved separately or replaced by a padded bound; it cannot simply be assumed.

Further useful enquiries include roots of a scalar function along the curve, closest-point searches, <arc length>, and inversion of an <arc-length parametrization>. They can be implemented through evaluation, differentiation, certified bounds and recursive subdivision. \b[Evaluation, restriction, enclosure and error bounds are the essential primitives] needed for reliable clipping and rendering; an unqualified control-polygon approximation is insufficient.