Barvarian
Barvarian

Reputation: 51

How to compute inner control points for C2 continuous bicubic Bezier surface patches

I am trying to compute control points for a bicubic Bezier surface of smoothly joining tubes. This example gives 16 control points for a respective Bezier patch (in the syntax of OpenSCAD):

[[[ 2 ,  2 , 0], [2.5, 1.5, 0], [3.5,  1 , 0], [4,  1 , 0]],
 [[ 2 ,  2 , 1], [2.5, 1.5, 1], [3.5,  1 , 1], [4,  1 , 1]],
 [[1.3, 1.3, 2], [1.8,  0 , 2], [ 3 , 0.5, 2], [4, 0.5, 2]],
 [[ 0 ,  0 , 2], [1.8,  0 , 2], [ 3 ,  0 , 2], [4,  0 , 2]]]

The corner points are given; control points (shown in red) along the edges were computed from tangents with obvious directions: Bezier patch with control points and some normal vectors The patch can be mirrored on the planes z=0, y=0, x=4, and x=y to generate a larger composed surface which is C1 continuous along all four seams. That surface is also C2 continuous across seams in the planes z=0, y=0, and x=4 but not so across the seam in the plane x=y (see the V-shaped yellow normal vectors):

Bezier patch with control points (red) and normals (yellow) - mirrored four times

For the desired C2 continuity, surface normals along the offending seam should be coplanar to the plane x=y.

Is it possible at all to set the four inner control points such that the normals along all seams come out as desired?

If so, by what formula or algorithm should the inner control points be computed to allow for a fully C2 continous composed surface?

If not so, what is the appropriate approach to generate the wanted patch?

Upvotes: 5

Views: 674

Answers (1)

Cadeyrn
Cadeyrn

Reputation: 647

For the junction between two Bezier curves to be continuous and smooth, the three points at the junction must be aligned (as you can see in yellow on the sketch). That is because at its extremities, the curve is always tangent to the segment made by the last two points.

1

The same principle can be applied to the Bezier surfaces which you can see on the bottom of the sketch (also in yellow). I don't think there is a less restrictive solution.

Upvotes: 0

Related Questions