- for (var finger_num = 0; finger_num < params.num_fingers; finger_num++) {
- var finger_angle = finger_num / params.num_fingers;
- fingers = fingers.concat(finger(params, finger_crosssection, ring_radius, finger_angle));
+ 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_num, ring_radius, finger_angle));