Function Repository Resource:

TwistedSurface

Source Notebook

Generate a surface twisting a curve

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

ResourceFunction["TwistedSurface"][c,a,b,{u,v}]

gives the parametric surface parameterized by variables u and v and generated by a generatrix curve c at a distance a from the origin, twisted b times.

Details and Options

Twisted surfaces are a class of surfaces generated by torsion. "Twisting" effectively rotates the curve around the z-axis.
ResourceFunction["TwistedSurface"] generalizes the construction of the Möbius strip and Klein bottle, which are special cases.
The profile curve c must be a plane curve with the property that c(-t)=-c(t) where c(t)=(φ(t),ψ(t)). The corresponding twisted surface is defined by (a+cos(b u)φ(v)-sin(b u)ψ(v))(cos(u),sin(u),0)+sin(b u)ψ(v)+cos(b u)ψ(v))(0,0,1).

Examples

Basic Examples (2) 

The Möbius strip is generated with a half twist:

In[1]:=
tms = ResourceFunction["TwistedSurface"][{u, 0}, 1, 1/2, {u, v}]
Out[1]=
In[2]:=
ParametricPlot3D[
 Evaluate[tms], {u, -2 \[Pi], 0}, {v, -\[Pi]/4, \[Pi]/4}, Mesh -> {25, 0}, PlotRange -> All]
Out[2]=

See how the surface is generated:

In[3]:=
Manipulate[
 ParametricPlot3D[
  Evaluate[tms], {u, -2 \[Pi], uf}, {v, -\[Pi]/4, \[Pi]/4}, Mesh -> None, PlotRange -> {{-1.1, 1.8}, {-1.6, 1.6}, {-0.8, 0.8}}, PerformanceGoal -> "Quality"], {{uf, -\[Pi]}, -2 \[Pi] + .1, 0}]
Out[3]=

Scope (4) 

Increase the distance from the origin:

In[4]:=
tmsa = ResourceFunction["TwistedSurface"][{u, 0}, 4, 1/2, {u, v}]
Out[4]=
In[5]:=
ParametricPlot3D[
 Evaluate[tmsa], {u, -2 \[Pi], 0}, {v, -\[Pi]/4, \[Pi]/4}, Mesh -> {25, 0}, PlotRange -> All]
Out[5]=

A complete twist:

In[6]:=
tmsb = ResourceFunction["TwistedSurface"][{u, 0}, 1, 1, {u, v}]
Out[6]=
In[7]:=
ParametricPlot3D[
 Evaluate[tmsb], {u, -2 \[Pi], 0}, {v, -\[Pi]/4, \[Pi]/4}, Mesh -> {25, 0}, PlotRange -> All]
Out[7]=

A lemniscate:

In[8]:=
lem = Entity["PlaneCurve", "Lemniscate"]["ParametricEquations"][1][t]
Out[8]=

A twist of a lemniscate gives the figure–eight parametrization of a Klein bottle:

In[9]:=
tlem = ResourceFunction["TwistedSurface"][
  Entity["PlaneCurve", "Lemniscate"]["ParametricEquations"][1][u, v], 2, 1/2, {u, v}]
Out[9]=

Plot the Klein bottle:

In[10]:=
ParametricPlot3D[
 Evaluate[tlem], {u, -\[Pi]/8, 3 \[Pi]/2}, {v, 0, 2 \[Pi]}, Mesh -> {25, 0}]
Out[10]=

A Lissajous curve:

In[11]:=
lissajous[n_, d_, a_, b_][t_] := {a Sin[n t + d], b Sin[t]}

A twist of the Lissajous curve:

In[12]:=
tlis = ResourceFunction["TwistedSurface"][lissajous[4, 0, 1, 1][u], 2,
   1/2, {u, v}]
Out[12]=

Plot the resulting surface:

In[13]:=
ParametricPlot3D[
 Evaluate[tlis], {u, -\[Pi]/8, 3 \[Pi]/2}, {v, 0, 2 \[Pi]}, Mesh -> {25, 0}, PlotPoints -> 80]
Out[13]=

Publisher

Enrique Zeleny

Version History

  • 1.0.0 – 14 August 2020

Source Metadata

Related Resources

License Information