Basic vs. Python: Helix Curve (with Casio fx-CG 50)
Calculators Used: Casio fx-CG100, Casio fx-CG50
The Helix Curve
The helix space curve can be defined with the following set of parametric equations:
x(t) = r × cos(t)
y(t) = r × sin(t)
z(t) = c × t
where r = radius, c = spacing between the coils of the helix
We can use any measurement of length we want, such as meters, feet, or inches, as long as our measurements are consistent.
Graphing the Helix Equation
Regarding calculators, 3D parametric equations can be graphed with the Casio fx-CG 50, fx-CG 100 (independent variables s and t), and the TI-Nspire (independent variables t and u). The screenshots below is a graph of a helix with the use of the fx-CG 100 emulator (classpad.workspace.com):
Curvature, Torsion, and Arc Length of a Helix
For the formulas, let
x = r × cos(t), x’ = -r × sin(t), x’’ = -r × cos(t), x’’’ = r × sin(t)
y = r × sin(t), y’ = r × cos(t), y’’ = -r × sin(t), y’’’ = -r × cos(t)
z = c × t, z’ = c, z’’ = 0, z’’’ = 0
The variable t is the independent variable of x(t), y(t), and z(t).
Curvature
The general formula for curvature:
k² = ((x’² + y’² + z’²) × (x’’² + y’’² + z’’²) – (x’ × x’’ + y’ × y’’ + z’ × z’’)) ÷ (x’² + y’² + z’²)³
Applying to the helix:
k² = ((r² sin² t + r² cos² t + c²) × (r² cos² t + r² sin² t + 0) – (r² sin t cos t – r² sin t cos t + 0)) ÷ (r² sin² t + r² cos² t + c²)³
Note: r² sin² t + r² cos² t = r² × (sin² t + cos² t) = r²
k² = ((r² + c²) × r²) ÷ (r² + c²)³
k² = r² ÷ (r² + c²)²
k = r ÷ (r² + c²)
Note: curvature is assumed to be a positive value
Torsion
The general formula for torsion:
τ =
(x’’’ × (y’ × z’’ – y’’ × z’) + y’’’ × (x’’’ × z’ – x’ × z’’’) + z’’’ × (x’ × y’’ – x’’ × y’))
÷ ((y’ × z’’ – y’’ × z’)² + (x’’ × z’ – x’ × z’’)² + (x’ × y’’ – x’’ × y’)²)
Breaking it down into parts:
x’’’ × (y’ × z’’ – y’’ × z’) = r × sin t × (0 - -r × sin t × c) = r² × c × sin² t
y’’’ × (x’’’ × z’ – x’ × z’’’) = -r × cos t × (-r × cos t × c – 0) = r² × c × cos² t
z’’’ × (x’ × y’’ – x’’ × y’) = 0
x’’’ × (y’ × z’’ – y’’ × z’) + y’’’ × (x’’’ × z’ – x’ × z’’’) + z’’’ × (x’ × y’’ – x’’ × y’)
= r² × c × sin² t + r² × c × cos² t + 0 = r² × c
(y’ × z’’ – y’’ × z’)² = (0 - -r × sin t × c)² = r² × c² × sin² t
(x’’ × z’ – x’ × z’’)² = (-r × cos t × c – 0)² = r² × c² × cos² t
(x’ × y’’ – x’’ × y’)² = (r² sin² t + r² cos² t)² = r^4
(y’ × z’’ – y’’ × z’)² + (x’’ × z’ – x’ × z’’)² + (x’ × y’’ – x’’ × y’)²
= r² × c² × sin² t + r² × c² × cos² t + r^4 = r² × c² + r^4 = r² × (c² + r²)
Then:
τ = (r² × c) ÷ (r² × (c² + r²)) = c ÷ (r² + c²)
Arc Tangent from t = 0 to t = x
s = ∫ √(x’² + y’² + z’²) dt from t = 0 to t = x
Since:
x’² + y’² + z’² = r² sin² t + r² cos² t + c² = r² + c²
Then:
s = ∫ √(x’² + y’² + z’²) dt from t = 0 to t = x
= ∫ √(r² + c²) dt from t = 0 to t = x
= x × √(r² + c²)
To summarize, for the helix curve:
Curvature: k = r ÷ (r² + c²)
Torsion: τ = c ÷ (r² + c²)
Arc Length to x: s = x × √(r² + c²)
The code below calculates the following:
* curvature
* torsion
* arc length to 2π
Casio fx-CG50 Program HELIXFX
"HELIX: CASIO BASIC"
"RADIUS"?→R
"SPACING"?→c
"CURVATURE="
R÷(R²+C²)→K ◢
"TORISON="
C÷(R²+C²)→T ◢
"ARC LENGTH TO 2π="
2×π×√(R²+C²)→S
Python Script: helixp.py
from math import *
print("Helix: Parameters")
print("math module imported\n")
r=eval(input("radius? "))
c=eval(input("spacing? "))
k=r/(r**2+c**2)
t=c/(r**2+c**2)
print("curvature=\n",str(k))
print("torsion=\n",str(t))
print("arc length to 2pi=\n",str(s))
Example
Radius: r = 2.75
Spacing: c = 0.89
Outputs:
Curvature: 0.3291599837
Torsion: 0.1065281402
Arc length to 2π: 18.16112298
Sources
Harris, John W. and Horst Stocker. Handbook of Mathematics and Computational Science Springer: New York, NY. 2006. ISBN 978-0-387-94746-4
Lee, Sarah. “Curvature and Torsion of 3D Parametric Curves.” Number Analytics // Super Easy Data Analysis Tool for Research, May 17, 2015, www.numberanalytics.com/blog/curvature-torsion-3d-parametric-curves . Accessed 02 July 2025.
Weisstein, Eric W. "Helix." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/Helix.html Accessed July 2, 2025.
Wikimedia Foundation. “Torsion of a curve.” Wikipedia. Lasted Edited January 2, 2023, https://en.wikipedia.org/wiki/Torsion_of_a_curve Accessed July 2, 2025.
Eddie
All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.
The author does not use AI engines and never will.
