From: Scott Worley Date: Sun, 25 May 2014 08:03:07 +0000 (-0700) Subject: Space fingers uniformly, not by number per ring X-Git-Url: http://git.scottworley.com/nt3d/commitdiff_plain/bdd7bcc0908b9eb688223b1cc48dbc80b4ef3556 Space fingers uniformly, not by number per ring --- diff --git a/medusa.html b/medusa.html index 7c7c858..da807f5 100644 --- a/medusa.html +++ b/medusa.html @@ -18,8 +18,9 @@ var fingers = []; for (var ring_num = 0; ring_num < params.num_rings; ring_num++) { var ring_radius = params.first_ring_radius + ring_num * params.ring_spacing; - for (var finger_num = 0; finger_num < params.num_fingers; finger_num++) { - var finger_angle = finger_num / params.num_fingers; + var num_fingers = Math.round((ring_radius * 2 * Math.PI) / params.finger_spacing); + for (var finger_num = 0; finger_num < num_fingers; finger_num++) { + var finger_angle = finger_num / num_fingers; fingers = fingers.concat(finger(params, finger_crosssection, ring_radius, finger_angle)); } } @@ -29,7 +30,7 @@ var params = [["first_ring_radius", 20], ["num_rings", 4], ["ring_spacing", 10, "Space Between Rings"], - ["num_fingers", 5], + ["finger_spacing", 10], ["finger_radius", 3], ["finger_faces", 3], ["finger_points", 20],