mead-horn: swap default aspect ratio
[clinton/3d-models.git] / mead-horn / mead-horn.scad
1 // 2021
2
3 // Single person mead horn, for winter solstice 2021 since sharing
4 // mead from the real horn is probably still unsafe.
5
6 use <dotscad/shape_circle.scad>;
7 use <dotscad/helix_extrude.scad>;
8
9 bottom_radius = 4;
10 top_radius = 33;
11 horn_length = 135;
12 horn_rise = 40;
13 horn_twist = 0;
14 horn_aspect = [ 1.0, 0.92 ];
15
16 module helix_horn () {
17 helix_levels = 1/6;
18
19 arc_measure = (360 * helix_levels) * (3.13 / 180);
20 arc_length = horn_length;
21 helix_radius = (arc_length / arc_measure);
22
23 // Round off end
24 // todo: dotscad rounded cone instead?
25 translate ([helix_radius, 0, 0]) scale ([horn_aspect[0], 1/2, horn_aspect[1]]) intersection () {
26 sphere (r = bottom_radius);
27 rotate ([90, 0, 0]) cylinder (h = bottom_radius, r = bottom_radius, center=false);
28 }
29
30 shape_pts = [ for (pts = shape_circle (radius = bottom_radius)) [ pts[0] * horn_aspect[0], pts[1] * horn_aspect[1] ] ];
31
32 helix_extrude(shape_pts,
33 radius = helix_radius,
34 scale = top_radius/bottom_radius,
35 levels = helix_levels,
36 level_dist = horn_rise / helix_levels,
37 vt_dir = "SPI_UP",
38 twist = horn_twist / helix_levels
39 );
40 }
41
42 helix_horn ($fs = 0.1, $fa = 1);