- for (var i = 0; i < num_fingers; i++) {
- var finger_angle = i / num_fingers;
- var path = [];
- for (var j = 0; j <= finger_points; j++) {
- var angle = (finger_angle + finger_twirl * j / finger_points) * 2 * Math.PI;
- var x = base_ring_radius * Math.cos(angle);
- var y = base_ring_radius * Math.sin(angle);
- path.push([x, y, finger_height * j / finger_points]);
+ for (var ring_num = 0; ring_num < num_rings; ring_num++) {
+ var ring_radius = first_ring_radius + ring_num * ring_spacing;
+ for (var finger_num = 0; finger_num < num_fingers; finger_num++) {
+ var finger_angle = finger_num / num_fingers;
+ var path = [];
+ for (var finger_point = 0; finger_point <= finger_points; finger_point++) {
+ var angle = (finger_angle + finger_twirl * finger_point / finger_points) * 2 * Math.PI;
+ var x = ring_radius * Math.cos(angle);
+ var y = ring_radius * Math.sin(angle);
+ path.push([x, y, finger_height * finger_point / finger_points]);
+ }
+ var finger = nt3d.extrude(path, finger_crosssection, [0, 0, 1], nt3d.pathnormals_from_point(path, [0, 0, 0]));
+ fingers = fingers.concat(finger);