4 <script type=
"text/javascript" src=
"nt3d.js"></script>
5 <script type=
"text/javascript">
6 function medusa(base_ring_radius, num_fingers, finger_radius, finger_faces, finger_height) {
7 var finger_crosssection = nt3d.circle(finger_radius, finger_faces);
9 for (var i =
0; i < num_fingers; i++) {
10 var base_x = base_ring_radius * Math.cos(i * (
2 * Math.PI / num_fingers));
11 var base_y = base_ring_radius * Math.sin(i * (
2 * Math.PI / num_fingers));
12 console.log(base_x, base_y);
13 var path = [[base_x, base_y,
0], [base_x, base_y, finger_height]];
14 var finger = nt3d.extrude(path, finger_crosssection, [
0,
0,
1], nt3d.pathnormals_from_point(path, [
0,
0,
0]));
15 fingers = fingers.concat(finger);
20 var params = [["Base ring radius",
100],
21 ["Number of fingers",
5],
24 ["Finger height",
100]];
27 <body onload=
"nt3d.framework(medusa, params)">
29 <p>An artsy thing.
</p>