Tor Olav Kristensen wrote:
> ...
> Is it something like the code below that you need ?
> ...
I was curious about how John VanSickle did his FindKnee
macro.
So I had a look at it - and found that his is very similar to mine.
But I learned from his code that my test for correctness of the
ankle position relative to the hip position is not comprehensive
enough.
This part in my code:
#declare LegLength = LengthOfThigh + LengthOfShin;
#if (vlength(PositionOfAnkle - PositionOfpHip) > LegLength)
#debug "\n\nError: The ankle is to far away from the hip.\n\n"
#end // if
should be replaced by this:
#declare Dist = vlength(PositionOfAnkle - PositionOfpHip);
#if (Dist > LengthOfThigh + LengthOfShin)
#debug "\n\nError: The ankle is too far away from the hip.\n\n"
#end // if
#if (Dist < abs(LengthOfThigh - LengthOfShin))
#debug "\n\nError: The ankle is too close to the hip.\n\n"
#end // if
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|