베 지어 삼각형 플로팅

Nov 29 2020

이 4 개의 점을 보간하는 베 지어 삼각형을 구성해야합니다.

$\qquad (0,0,1),\,(1,0,0),\,(0,1,0),\,(0.5,0.5,0.75)$

그러나 내가 얻는 표면은 너무 이상합니다. 누구 든지이 문제를 해결하도록 도와 줄 수 있습니까?

pts = 
  {{{0, 0, 1}, {0.5, 0.5, 0.75}, {1, 0, 0}}, 
   {{0, 0, 1}, {0, 1, 0}, {0.5, 0.5, 0.75}}, 
   {{0, 1, 0}, {0.5, 0.5, 0.75}, {1, 0, 0}}};
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"}]

답변

4 cvgmt Nov 29 2020 at 13:42
a = {1, 0, 0};
b = {0, 1, 0};
c = {0, 0, 1};
d = {0.5, 0.5, 0.75};
m = 1.38 d;
pts = {{a, a, a, a}, 
      {2/3 a + 1/3 b, m, m, 2/3 a + 1/3 c}, 
      {2/3 b + 1/3 a, m, m, 2/3 c + 1/3 a}, 
      {b, 2/3 b + 1/3 c, 2/3 c + 1/3 b, c}};
f = BezierFunction[pts];
Show[Graphics3D[{PointSize[0.04], Point[{a, b, c, d}]}], 
 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"}, ViewPoint -> {1.64, -0.14, 2.95}]