I need to construct a triangular patch by using the 6 control points:
$$\begin{array}{ccc} \left(\frac{1}{2},\frac{\sqrt{3}}{4},1\right) & \left(\frac{1}{4},\frac{\sqrt{3}}{4},2\right) & \left(\frac{3}{4},\frac{\sqrt{3}}{4},2\right) \\ (0,0,1) & \left(\frac{1}{2},0,2\right) & (1,0,1) \\ \end{array}$$
However, the surface seems not like a triangular patch. Can anyone help me to solve the problem?
Here is the code:
pts =
{{{1/2, Sqrt[3]/2, 1}, {0, 0, 1}},
{{1/4, Sqrt[3]/4, 2}, {1/2, 0, 2}},
{{3/4, Sqrt[3]/4, 2}, {1, 0, 1}}};
f = BezierFunction[pts]
Show[
Graphics3D[{PointSize[Medium], Red, Map[Point, pts]}],
Graphics3D[{Gray, Line[pts], Line[Transpose[pts]]}],
ParametricPlot3D[f[u, v], {u, 0, 1}, {v, 0, 1},
ColorFunction -> "Rainbow"],
Mesh -> Full,
Axes -> True,
AxesLabel -> {"x", "y", "z"}]
Sqrt[3]/2
. Did you meanSqrt[3]/4
in both places? $\endgroup$