Channel problem:
Given a (2D or 3D) polygonal channel,
generate a spline that traverses the channel and stays strictly inside.
The user can specify: degree and smoothness of the spline,
the location of the spline breakpoints.
In the examples below, the channels are in a semi-transparent gray so that the
spline curve and its control points in space are visible.
The overlay of semi-transparent channel walls creates darker and lighter
regions - this is just an artifact of projection.
Note that the control polygon does not generally stay inside the channel - so
that a fit based on bounding the control polygon would not be able to
generate these solutions to the fitting problem.
Single degree 3 Bezier curve in a sharp-cornered 2D channel   |
Degree 3 Bezier spline in a 2D mazewith many sharp corners   |
stay inside the channel - so that a fit based on bounding the control polygon would not be able to generate this solution to the fitting problem even after two subdivisions.   | |
  |