This page is a result of me finding hardly any very useful documentation about cubic tensor product patches
and how to subdivide them easily. It is also a convenient place for me to go to in order to re-learn what I keep forgetting.
It is a part of the Laxkit documentation.
By Tom Lechner. This page is released under the
Creative Commons Attribution Non-Commercial Share-Alike license.
If we take g=3, then we have the most common type of this sort of cubic curve. So from the above we find:
or
Note that .
This curve has the convenient subdividable property that with points p0 to p3, we can subdivide this so that we have 2 new segments whose points are [p0 q1 q2 q6] and [q6 q4 q5 p3]. Note also that a bezier segment will always be contained within the bouning box of the vertex and control points. More specifically, the curve will always be contained within the convex hull of those points.
where p are either the x or y coordinates of the points, depending on whether you want the x or y coordinate of P.
(*** TODO: explain where the hell that patch equation came from)
For and , make corresponding matrices:
These will be linearly related to and like this:
So , and where:
Use those plus the above equation for a patch and get points Q:
where is the plain bezier curve matrix, is the coordinate matrix of the original patch as above, and magically contains the coordinate matrix of the new patch for u and v.