1
$\begingroup$

I am having some confusion in plotting a Bézier curve for the specified interval $[a, b]$ for a given control point polygon. For example:

pts = {{0, 0, 0}, {1, 0, 0}, {1, 0, 1}, {1, 1, 1}, {1, 1, 0}, {0, 1, 
    0}}; (*my control Polygon*)
f = BezierFuntion[pts]

Show[Graphics3D[{PointSize[Medium], Red, Map[Point, pts]}], 
 Graphics3D[{Gray, Line[pts], Line[Transpose[pts]]}], 
 ParametricPlot3D[
  f[u, v], {u,a , b}, {v, a, b}]]

when I try this, I get various dimension mismatch errors. Can someone help me understand and plot the curve ?

$\endgroup$
1
$\begingroup$

Maybe

pts = {{0, 0, 0}, {1, 0, 0}, {1, 0, 1}, {1, 1, 1}, {1, 1, 0}, {0, 1, 0}};
f = BezierFunction[pts];
Graphics3D[{PointSize[Medium], Red, Point@pts, Thick, Gray, Line@pts, 
           Blue, ParametricPlot3D[f[u], {u, 0, 1}, {v, 0, 1}][[1]]}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.