POV-Ray : Newsgroups : povray.newusers : IK Leg (Guy on a bike) Server Time
25 Dec 2024 22:51:46 EST (-0500)
  IK Leg (Guy on a bike) (Message 1 to 3 of 3)  
From: Tail Kinker
Subject: IK Leg (Guy on a bike)
Date: 23 Jun 2007 07:50:40
Message: <467d0910$1@news.povray.org>
Does anyone have a description of a simple IK Leg, that would work for a 
guy on a bike? (I'm using POV as a simple CAD program...)


Post a reply to this message

From: Alain
Subject: Re: IK Leg (Guy on a bike)
Date: 23 Jun 2007 18:30:44
Message: <467d9f14@news.povray.org>
Tail Kinker nous apporta ses lumieres en ce 2007/06/23 07:48:
> Does anyone have a description of a simple IK Leg, that would work for a 
> guy on a bike? (I'm using POV as a simple CAD program...)
You could use povman or povperson. The only difference is the head. Povman use 
blobs to model the head, povperson use a mesh2 head.
Both are completely posable, the position of the foot is deffined relative to 
the lower leg, and the lower leg is relative to the uper leg. Not sure, but I 
think that you can position each toes.

-- 
Alain
-------------------------------------------------
We did not raise armies for glory or for conquest.
Thomas Jefferson


Post a reply to this message

From: Charles C
Subject: Re: IK Leg (Guy on a bike)
Date: 28 Jun 2007 13:15:02
Message: <web.4683ec0d10b5870ce94cc5130@news.povray.org>
Tail Kinker <gro### [at] yahoocouk> wrote:
> Does anyone have a description of a simple IK Leg, that would work for a
> guy on a bike? (I'm using POV as a simple CAD program...)

I hope this isn't too little too late, but I think maybe what you want is
the law of cosines:
http://en.wikipedia.org/wiki/Law_of_cosines

I'm assuming you're using vectors to represent the thigh, shin and foot etc:


Perhaps the foot changes angle relative to the ground according to some sine
wave or perhaps it stays the same all the way around.  Either way, you can
directly determine the position of the ankle.   Assuming there's little or
no hip movement when pedaling, you also know the distance from the hip to
the ankle.  That gives you the third length in the triangle formed by the
thigh, shin and the line between the hip and the ankle.

So, if I have it right, the interior angles of that triangle are:

// Per the law of cosines, where capital letters are angles and lower-case
are lengths of opposite sides:
// cos(A) = ( pow(b,2) + pow(c,2) - pow(a,2) ) / (2*b*c)
// So...
// A = acos(   ( pow(b,2) + pow(c,2) - pow(a,2) ) / (2*b*c)     )
#local AnkleAngle = acos(   ( pow(ShinLength,2) + pow(HipAnkleDist,2) -
pow(ThighLength,2) ) / (2*ShinLength*HipAnkleDist)    );
#local HipAngle   = acos(   ( pow(HipAnkleDist,2) + pow(ThighLength,2) -
pow(ShinLength,2) ) / (2*HipAnkleDist*ThighLength)   );
#local KneeAngle  = acos(   ( pow(ThighLength,2) + pow(ShinLength,2) -
pow(HipAnkleDist,2) ) / (2*ThighLength*ShinLength)     );
#local AnkleAngle = degrees(AnkleAngle);
#local HipAngle   = degrees(HipAngle);
#local KneeAngle  = degrees(KneeAngle);


These angles would have to be used in relation to other angles such as the
angle between the seat and the center of the crankshaft.  Some additional
figuring would be nececessary if the hips are wider or narrower than the
pedals.... Also the AnkleAngle here is for completeness but probably isn't
the most useful.  Once you know the position of the knee, it might be
better to measure the angle between the intended positions of the toe,
ankle and knee using VAngleD() and plug that number into your model's foot
angle.

Charles


Post a reply to this message

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