added MCAD for gears; updated bom with fixes; removed old X carriage; added ATX holde...
[clinton/wilson.git] / scad / MCAD / curves.scad
1 // Parametric curves, to be used as paths
2 // Licensed under the MIT license.
3 // © 2010 by Elmo Mäntynen
4 use <math.scad>
5 include <constants.scad>
6
7
8
9 /* A circular helix of radius a and pitch 2πb is described by the following parametrisation:
10 x(t) = a*cos(t),
11 y(t) = a*sin(t),
12 z(t) = b*t
13 */
14
15
16 function b(pitch) = pitch/(TAU);
17 function t(pitch, z) = z/b(pitch);
18
19 function helix_curve(pitch, radius, z) =
20 [radius*cos(deg(t(pitch, z))), radius*sin(deg(t(pitch, z))), z];
21