From 2edbc11b1d7b38e3fdb0e88fb550313f176d538b Mon Sep 17 00:00:00 2001 From: Elmom Date: Sun, 25 Jul 2010 18:03:04 +0300 Subject: [PATCH] Added curves.scad, includes helix_curve() ATM --- curves.scad | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 curves.scad 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]; +