Tag Info

New answers tagged

2

I discovered a good reference by Google today occationly, please here There are many ways to generate closed curves. The simple ones are either wrapping control points or wrapping knot vectors. Wrapping Control Points Suppose we want to construct a closed B-spline curve $C(u)$ of degree $p$ defined by $n+1$ control points $P_0, P_1, \cdots, P_n$. The ...


6

The following works for your curve: points = {{1, 4}, {.5, 6}, {5, 4}, {3, 12}, {11, 14}, {8, 4}, {12, 3}, {11, 9}, {15, 10}, {17, 8}}; deg = 3; pointsCLOSE1 = Join[points, points]; n = Length@pointsCLOSE1; knotsCLOSE1 = Range[0, 1, 1/(n + 1)]; ParametricPlot[deBoor[pointsCLOSE1, {deg, knotsCLOSE1}, t], {t, deg/(n + 1), 1}, Axes ...


1

The interpolateCurve function gives the interpolation of curves. Options[interpolateCurve] = Join[Options[ParametricPlot3D], Options[Interpolation]]; interpolateCurve[pts : {{_, _} ..}, opts : OptionsPattern[]] := Module[{order, x, y, s, func1, func2}, order = OptionValue[InterpolationOrder]; x = pts[[All, 1]]; y = pts[[All, 2]]; ...


7

Since there is really something wrong with the BezierCurve, I made this work-around: Clear[bezierCurve]; bezierCurve[pts_] := First@ParametricPlot[ BezierFunction[pts, SplineDegree -> Length[pts] - 1][t], {t, 0, 1}] Manipulate[ Graphics[{bezierCurve[pts], Dashed, Green, Line[pts]}, PlotRange -> {{-.5, 1.5}, {-.5, 1.5}}, Frame -> ...



Top 50 recent answers are included