Permalink
Browse files

Added curves.scad, includes helix_curve() ATM

  • Loading branch information...
1 parent fd06f8e commit 2edbc11b1d7b38e3fdb0e88fb550313f176d538b @elmom committed Jul 25, 2010
Showing with 17 additions and 0 deletions.
  1. +17 −0 curves.scad
View
@@ -0,0 +1,17 @@
+include <constants.scad>
+use <math.scad>
+
+
+/* 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];
+

0 comments on commit 2edbc11

Please sign in to comment.