1
$\begingroup$

I want to visualize a 3D nonplanar pretzel using a closed cubic B-spline displayed with Tube.

I'm just absolutely lost on the whole thing. The closest pretzel shape I've been able to make was using this:

Show[
  ParametricPlot3D[{(3 + Sin[x/2])*Cos[x], (3 + Sin[x/2])*Sin[x], 2 Cos[x/2]}, 
    {x, 0, 15}] 
  /. 
    Line -> (Tube[#, 0.4] &), 
  PlotRange -> All]

But that's not using a B-spline, and I can't seem to find any documentation on creating 3D objects with a B-spline and Tube.

$\endgroup$

closed as unclear what you're asking by user9660, RunnyKine, MarcoB, Sjoerd C. de Vries, Yves Klett Apr 25 '16 at 9:32

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

3
$\begingroup$

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]]

enter image description here

Play with the 5 points until you are satisfied.

$\endgroup$
  • $\begingroup$ awesome, thanks a bunch $\endgroup$ – Michael Baldwin Apr 28 '16 at 10:34

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