]> git.scottworley.com Git - nt3d/blobdiff - medusa.html
Name r
[nt3d] / medusa.html
index 0576312144c3a38931b80f89f473e9a943138b7d..9bd3dc7e877d95d8d0ede976d5365b56d2ec0f8a 100644 (file)
         for (var finger_point = 0; finger_point <= params.finger_points; finger_point++) {
           var finger_progress = finger_point / params.finger_points;
           var angle = (finger_angle + twirl_angle * finger_progress) * 2 * Math.PI;
-          var x = ring_radius * Math.cos(angle);
-          var y = ring_radius * Math.sin(angle);
-          path.push([x, y, params.finger_height * finger_progress]);
+          var r = ring_radius;
+          var x = r * Math.cos(angle);
+          var y = r * Math.sin(angle);
+          var z = params.finger_height * finger_progress;
+          path.push([x, y, z]);
         }
         return nt3d.extrude(path, finger_crosssection, [0, 0, 1], nt3d.pathnormals_from_point(path, [0, 0, 0]));
       }