Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the torsion of a curve
| ResourceFunction["CurveTorsion"][c,t] computes the torsion of a space curve c parametrized by t. | 
Plot the twisted cubic curve:
| In[1]:= | ![ParametricPlot3D[{t, t^2, t^3}, {t, -5, 5}]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/7039629765f06c9c.png) | 
| Out[1]= |  | 
Compute the torsion of the twisted cubic curve:
| In[2]:= | ![ResourceFunction["CurveTorsion"][{t, t^2, t^3}, t]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/7432383a2fe6d3d0.png) | 
| Out[2]= |  | 
Compute the curvature using the resource function Curvature:
| In[3]:= | ![ResourceFunction["Curvature"][{t, t^2, t^3}, t]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/6514a539d1e0ab21.png) | 
| Out[3]= |  | 
Plot them:
| In[4]:= | ![Plot[{%, %%}, {t, 0, 1}]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/1911f613cc795c8d.png) | 
| Out[4]= |  | 
For this curve, the torsion and curvature are the same:
| In[5]:= | ![Simplify[
 ResourceFunction["CurveTorsion"][{3 t - t^3, 3 t^2, 3 t + t^3}, t], t > 0]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/1af955ef884d6878.png) | 
| Out[5]= |  | 
| In[6]:= | ![Simplify[
 ResourceFunction["Curvature"][{3*t - t^3, 3*t^2, 3*t + t^3}, t]]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/7bb88f8405d29896.png) | 
| Out[6]= |  | 
Plot of the above results:
| In[7]:= | ![Plot[{%, %%}, {t, -2, 2}]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/31b2403566654942.png) | 
| Out[7]= |  | 
A curve that is qualitatively similar to a torus knot:
| In[8]:= | ![tknot = {Cos[3 t], Cos[Sqrt[2] + 4 t], Cos[Sqrt[3] + 5 t]}](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/5169064424666977.png) | 
| Out[8]= |  | 
Plot the curve:
| In[9]:= | ![ParametricPlot3D[tknot, {t, 0, 2 \[Pi]}]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/3f579aeb1e80b34b.png) | 
| Out[9]= |  | 
Find the torsion:
| In[10]:= | ![ResourceFunction["CurveTorsion"][tknot, t] // Simplify](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/33ac0cff57dd4a80.png) | 
| Out[10]= |  | 
Plot this:
| In[11]:= | ![Plot[%, {t, 0, 2 \[Pi]}]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/0c69e929c122dc35.png) | 
| Out[11]= |  | 
Compute the curvature with the resource function Curvature:
| In[12]:= | ![Simplify[ResourceFunction["Curvature"][tknot, t]]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/162a5526d8eeb3d6.png) | 
| Out[12]= |  | 
| In[13]:= | ![Plot[%, {t, 0, 2 \[Pi]}]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/32cd81f4aa88ad74.png) | 
| Out[13]= |  | 
Define a conical spiral:
| In[14]:= | ![cs = Entity["SpaceCurve", "ConicalSpiral"]["ParametricEquations"][1, 1][t]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/7362df84eff93830.png) | 
| Out[14]= |  | 
Here is the torsion:
| In[15]:= | ![\[Tau] = FullSimplify[
  ResourceFunction["CurveTorsion"][{t Cos[t], t Sin[t], t}, t], t > 0]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/00010a1f99d0bbf7.png) | 
| Out[15]= |  | 
There are other quantities related to torsion. The inverse of the torsion is called the radius of torsion:
| In[16]:= | ![1/\[Tau]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/085e1a119ace0052.png) | 
| Out[16]= |  | 
The curvature, which can be calculated with the resource function Curvature:
| In[17]:= | ![\[Kappa] = FullSimplify[
  ResourceFunction["Curvature"][{t*Cos[t], t*Sin[t], t}, t]]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/432ef6937cb269b2.png) | 
| Out[17]= |  | 
There is also the so-called total curvature:
| In[18]:= | ![FullSimplify[Sqrt[\[Kappa]^2 + \[Tau]^2], t > 0]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/113c8e2f722837a2.png) | 
| Out[18]= |  | 
Definition of a unit speed helix:
| In[19]:= | ![uhelix = {a Cos[t/Sqrt[a^2 + b^2]], a Sin[t/Sqrt[a^2 + b^2]], (b t)/
   Sqrt[a^2 + b^2]};](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/6bab384b4ca5ef43.png) | 
The curvature, via the resource function Curvature:
| In[20]:= | ![\[Kappa] = Simplify[ResourceFunction["Curvature"][
       uhelix, t], a > 0 && b > 0 && t > 0]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/44bcdfaac5a2a7ef.png) | 
| Out[20]= |  | 
The torsion:
| In[21]:= | ![\[Tau] = Simplify[ResourceFunction["CurveTorsion"][uhelix, t], a > 0 && b > 0 && t > 0]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/00e804fa37221509.png) | 
| Out[21]= |  | 
The relation to the Frenet-Serret system is that the curvature and the torsion are the first two quantities:
| In[22]:= | ![First@PowerExpand@Simplify@FrenetSerretSystem[uhelix, t]](https://www.wolframcloud.com/obj/resourcesystem/images/ff9/ff9aa74a-a6aa-4d88-bdda-9760be172c0e/51d222b46e626b9f.png) | 
| Out[22]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License