From 56cee0fb3fe3d7b624133a22adcd989dfaae45a9 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Mon, 25 May 2020 22:28:12 -0400 Subject: [PATCH] Add verbose comments, trying to figure this spiral generation out. Ahhhh! --- spiral/spiral_3.scad | 16 ++++++++++++++++ spiral/spiral_4.scad | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/spiral/spiral_3.scad b/spiral/spiral_3.scad index be99475..595ec90 100644 --- a/spiral/spiral_3.scad +++ b/spiral/spiral_3.scad @@ -26,6 +26,22 @@ module spiral (count = 40, start_d = 48, spacing = 2.075) { increment = spacing / $fn; facetProfile = [[0, 0], [top_offset, -h], [bottom, -h], [bottom, 0]]; + + /** + * Verbose + spiralPath = [ + //for facet number times "count" or number of rotations + //create an array containing [ x, y, z] values for path extrude + for(t = [0 : $fn * count]) { + [ + //starting radius + (iterator * increment size) * (cosine || sine) of (iterator * fractional angle + ((start_d / 2) + (t * increment)) * cos(t * angle_i), //x value + ((start_d / 2) + (t * increment)) * sin(t * angle_i), //y value + 0 //z value + ] + } + ]; + **/ spiralPath = [ for(t = [0 : $fn * count]) diff --git a/spiral/spiral_4.scad b/spiral/spiral_4.scad index 614550d..408433f 100644 --- a/spiral/spiral_4.scad +++ b/spiral/spiral_4.scad @@ -6,7 +6,9 @@ $fn=FN; include <../libraries/path_extrude.scad>; /** - * Distinction from spiral_3: use of for loop and union to join rotations. + * Distinction from spiral_3: use of for loop and union to join rotations. Somehow + * got it into my head that this was faster? It does adjust the facet size to the + * diameter. **/ module spiral (count = 40, start_d = 48, spacing = 2.075) {