New answers tagged

0

Just a comment to @kglr with picture.I change his temp2[[1]]=temp1[[1]]to temp2[[2]]=temp1[[2]];temp2[[3]]=Mean@Delete[temp1,2].But this method don't sufficient to guarantee intersection of the curves like plot1 = ParametricPlot[ Evaluate[ l1[t] = BezierFunction[ temp1 = RandomReal[{0, RandomReal[50]}, {3, 2}]][t]], {t, 0, 3}]; plot2 = ...


3

One way is to force temp1 and temp2 to share an endpoint: plot1 = ParametricPlot[Evaluate[l1[t] = BezierFunction[ temp1 = RandomReal[{0, RandomReal[50]}, {3, 2}]][t]], {t, 0, 3}]; plot2 = ParametricPlot[Evaluate[l2[t] = BezierFunction[ temp2 = RandomReal[{0, RandomReal[50]}, {3, 2}]; temp2[[1]] = temp1[[1]]; temp2][t]], {t, 0, 3}, ...


6

What is happening: For every value of t that is sampled a new triple of Randominteger pairs is generated and a new BezierFunction is constructed. So every t that is sampled is processed with a different function. This can be seen using Trace on a simpler version of the problem. Trace[ParametricPlot[BezierFunction[RandomInteger[100, {3, 2}]][t], {t, 0, 1}, ...


2

I put together documentation and this question (for the number of points needed): Graphics3D[ Tube[BSplineCurve[{{-1, 0, 1}, {3, 2, 1}, {0, -2, 1}, {-3, 2, 1}, {1, 0, 1}}], 0.05]] Play with the 5 points until you are satisfied.


4

On MMA 10.3 on OSX 10.10.5 I get the same behaviour as @chuy - blunt on the front end and both export formats. I think the implementation is kind of buggy as one might expect the option JoinForm -> "Miter" to solve the problem, however it changes nothing. However, using the additional option JoinForm -> {"Miter",d} does create the desired behaviour ...


1

this is essentially the same, but a good bit faster, first tabulate the curve to get good starting values then use FindRoot: tab = Table[{u, tstf[u]}, {u, 0, 1, .01}]; start = (tab[[# - 1, 1]] &@ First@FirstPosition[tab, {u_, v_ /; v > #}]) & /@ Range[400, 699]; AppendTo[start, 1]; a = Table[(u /. FindRoot[tstf[u] == k, {u, start[[k - ...



Top 50 recent answers are included