POV-Ray : Newsgroups : povray.animations : Help! Angles or Targets? : Help! Angles or Targets? Server Time
6 Oct 2024 11:38:53 EDT (-0400)
  Help! Angles or Targets?  
From: Mark Hanford
Date: 25 Jan 2002 17:02:30
Message: <3c51d5f6@news.povray.org>
<ramble on>
I've been working on a posable hand, towards the goal of a fully
animated humaniform robot  (see my posts in p.b.a and p.b.i)

I've created the fingers in such a way that their position is determined
by the angles of the three joints:
object{Finger(Angle1, Angle2, Angle3)}

The problem is, when animating I think it would be easier to specify
the desired target for the fingertip and have the macro work out the
angles - but I can't figure the maths out :(

I have a macro for working out the position of the tip from the angles
given, but cannot work out the complementary formula.

For a finger based at the origin:
#local Nuckle2=vrotate(JointLength[J1][FingerType]*z, ThisAngle.x*x);
#local Nuckle3=Nuckle2+vrotate(JointLength[J2][FingerType]*z,
(ThisAngle.x+ThisAngle.y)*x);
#local FingerTip=Nuckle3+vrotate(JointLength[J3][FingerType]*z,
(ThisAngle.x+ThisAngle.y+ThisAngle.z)*x);

Because the fingertips (currently) only move in two dimensions (y and z)
this can be written as:
y=(Length1*SIN(Angle1))+(Length2*SIN(Angle1+Angle2))+(Length3*SIN(Angle1+Ang
le2+Angle3))
z=(Length1*COS(Angle1))+(Length2*COS(Angle1+Angle2))+(Length3*COS(Angle1+Ang
le2+Angle3))

I know (I think) that there is more than one possible combination of angles
that will give the same point, but
there must be a "simple" procedural way of doing this?

help!  This is somewhat beyond my mathematical tallents... (You should have
seen how long it took me to find the solutions to the Nuckle2, Nuckle3,
FingerTip stuff)

thanks,

Mark
Website & Sig on the way...
(http://news.povray.org/povray.binaries.images/21524/)
(http://news.povray.org/povray.binaries.animations/21525/)
<ramble off>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.