elm-geometry
elm-geometry copied to clipboard
Compute tight bounding boxes for quadratic/cubic splines
The current conservative implementation simply takes the bounding box of all control points; this is guaranteed to contain the spline but will in general not be a tight bounding box (may be bigger than necessary). It should be possible to analytically compute tight bounding boxes for quadratic/cubic splines in 2D and 3D by finding the local extrema in X, Y and Z. This will require finding where the derivative of each coordinate is zero, which will require solving some linear equations for quadratic splines or some quadratic equations for cubic splines.