Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 22 lines (14 sloc) 0.474 kB
0226991 @elmom Clarified the licenses in use in this library, has GPL2 and GPL3 whic…
authored
1 // Parametric curves, to be used as paths
2 // Licensed under the MIT license.
3 // © 2010 by Elmo Mäntynen
2edbc11 @elmom Added curves.scad, includes helix_curve() ATM
authored
4 use <math.scad>
9c1d8c4 @timschmidt Randome bits of syntax that openscad doesn't treat as errors
timschmidt authored
5 include <constants.scad>
6
2edbc11 @elmom Added curves.scad, includes helix_curve() ATM
authored
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
Something went wrong with that request. Please try again.