diff --git a/curves.scad b/curves.scad new file mode 100644 index 0000000..68102fd --- /dev/null +++ b/curves.scad @@ -0,0 +1,17 @@ +include +use + + +/* A circular helix of radius a and pitch 2πb is described by the following parametrisation: +x(t) = a*cos(t), +y(t) = a*sin(t), +z(t) = b*t +*/ + + +function b(pitch) = pitch/(TAU); +function t(pitch, z) = z/b(pitch); + +function helix_curve(pitch, radius, z) = + [radius*cos(deg(t(pitch, z))), radius*sin(deg(t(pitch, z))), z]; +