Function Repository Resource:

VariableSectionTube

Source Notebook

Compute the parametrization of a tube of variable section

Contributed by: Wolfram Staff (original content by Alfred Gray)

ResourceFunction["VariableSectionTube"][c,r,{t,θ}]

computes the parametrization of a tube from a curve c and of variable section radius r with respect to variables t and θ.

Details and Options

The parametrization has the form , where and are the normal and the binormal vectors of c, respectively.
The radius of the cross section is perpendicular to the tangent of the curve.

Examples

Basic Examples (3) 

Create tubes from a circle:

In[1]:=
vt = ResourceFunction["VariableSectionTube"][{ Cos[t], Sin[t], 0}, 1 + Cos[t], {t, \[Theta]}]
Out[1]=

Plot them:

In[2]:=
ParametricPlot3D[
   Evaluate[
    ResourceFunction[
     "VariableSectionTube"][{ Cos[t], Sin[t], 0}, #, {t, \[Theta]}]], {t, 0, 2 \[Pi]}, {\[Theta], 0, 2 \[Pi]}] & /@ {1 + Cos[t], .5 + .2 Cos[t], .2 + .5 Cos[t]}
Out[2]=

Create tubes based on a Sin function with angular frequency 4:

In[3]:=
ParametricPlot3D[
 Evaluate[
  ResourceFunction["VariableSectionTube"][5 { Cos[t], Sin[t], 0}, 1.5 + 0.75 Sin[4 t], {t, \[Theta]}]], {t, 0, 4 \[Pi]}, {\[Theta], 0, 2 \[Pi]}, PlotPoints -> {40, 15}]
Out[3]=

Create a tube from a helix:

In[4]:=
helix[a_, b_, c_][t_] := {a Cos[t], b Sin[t], c t}
In[5]:=
ParametricPlot3D[
 Evaluate[
  ResourceFunction["VariableSectionTube"][
   helix[1, 2.5, 2.2][t], .2 t + .2 Sin[2 t], {t, \[Theta]}]], {t, 0, 6 \[Pi]}, {\[Theta], 0, 2 \[Pi]}]
Out[5]=

Publisher

Enrique Zeleny

Version History

  • 1.0.0 – 14 July 2020

Source Metadata

Related Resources

License Information