My playground:
I would like to draw a disc centered on leftmost sphere and tangent to rightmost sphere, but whatever I tried failed while trying to calculate spheres distance:
- sphereL.position.subtract(sphereHand.position).length()
- sphereL.getAbsolutePosition().subtract(sphereHand.getAbsolutePosition()).length()
- by math:
xdist = SHOULDER_LENGTH*Math.sin(ang1) - FOREARM_LENGTH*Math.sin(ang2);
ydist = -SHOULDER_LENGTH*Math.cos(ang1) + FOREARM_LENGTH*Math.sin(ang1) - UPPERARM_LENGTH*Math.cos(ang1);
handDistance = Math.sqrt(Math.pow(xdist,2) + Math.pow(ydist,2));// * Math.cos(ang2);
Any idea?