<script type="text/javascript">
function finger(params, finger_crosssection, ring_radius, finger_angle) {
var path = [];
<script type="text/javascript">
function finger(params, finger_crosssection, ring_radius, finger_angle) {
var path = [];
var x = ring_radius * Math.cos(angle);
var y = ring_radius * Math.sin(angle);
path.push([x, y, params.finger_height * finger_point / params.finger_points]);
var x = ring_radius * Math.cos(angle);
var y = ring_radius * Math.sin(angle);
path.push([x, y, params.finger_height * finger_point / params.finger_points]);
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;
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));
}
}
fingers = fingers.concat(finger(params, finger_crosssection, ring_radius, finger_angle));
}
}
var params = [["first_ring_radius", 20],
["num_rings", 4],
["ring_spacing", 10, "Space Between Rings"],
var params = [["first_ring_radius", 20],
["num_rings", 4],
["ring_spacing", 10, "Space Between Rings"],