5

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?

Barvarian
  • 51
  • 2
  • Can you show just your defining curves, as well? Pretty as the texture mapped plot is, it is not clear where in this shape your original coordinates and the curves they explicitly define are. – Mike 'Pomax' Kamermans Apr 06 '17 at 16:46
  • The defining curves are the edges of the patch without mirrors (added as new image). The curves are defined as Bezier curves by the edges of the given matrix. K00=[0,0,2] and K30=[2,2,0] represent the upper right and lower right corners of that patch. Can normals along the edge from K00 to K30 be fixed by properly choosing K21 which is currently [1.8,0,2]? Or can normals be fixed by appropriate modification of all inner control points K11, K12, K21, and K22? – Barvarian Apr 07 '17 at 08:29

1 Answers1

0

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.

Cadeyrn
  • 545
  • 2
  • 12