POV-Ray : Newsgroups : povray.advanced-users : inverse kinematics? Server Time
29 Jul 2024 22:22:46 EDT (-0400)
  inverse kinematics? (Message 5 to 14 of 14)  
<<< Previous 4 Messages Goto Initial 10 Messages
From: Rune
Subject: Re: inverse kinematics?
Date: 28 Mar 2001 15:38:38
Message: <3ac24bce@news.povray.org>
"Reusser" wrote:
> Thank you very much!

Glad you could use it! :)

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 28)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Reusser
Subject: Re: inverse kinematics?
Date: 28 Mar 2001 16:55:05
Message: <3AC25D95.1EC64E82@chorus.net>
Rune wrote:

> "Reusser" wrote:
> > Thank you very much!
>
> Glad you could use it! :)
>
> Rune

Thanks again, again, but I did notice one small improvement you could
make.  If you replace the knee direction definition with these lines:

#declare HipAxis       = <1,0,0>
#declare KneeDirection =
vnormalize(vcross(AnklePoint-HipPoint,HipAxis));

you can get a wider range of movement before the whole thing flips or
before you get an error because the knee direction is parallel to the
line between the hip and ankle.


Post a reply to this message

From: Setepenaset
Subject: Re: inverse kinematics?
Date: 28 Mar 2001 17:15:41
Message: <3ac2628d@news.povray.org>
Thanks Rune! :-)

Sep


Post a reply to this message

From: Setepenaset
Subject: Re: inverse kinematics?
Date: 28 Mar 2001 17:17:37
Message: <3ac26301@news.povray.org>
Thanks Ruesser!! (what a bountiful day!)

Sep


Post a reply to this message

From: Rune
Subject: Re: inverse kinematics?
Date: 29 Mar 2001 09:16:53
Message: <3ac343d5$1@news.povray.org>
"Reusser" wrote:
> I did notice one small improvement you could make.
> If you replace the knee direction definition with these lines:
>
> #declare HipAxis       = <1,0,0>
> #declare KneeDirection =
> vnormalize(vcross(AnklePoint-HipPoint,HipAxis));
>
> you can get a wider range of movement before the whole thing
> flips or before you get an error because the knee direction is
> parallel to the line between the hip and ankle.

Are you sure? Have you actually tested it?

Have you considered line 84 in my code:

#declare KneeVector = Perpendiculize(KneeDirection,HipPoint-AnklePoint);

I think it does just about the same thing. If not, please explain further!
:)

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 28)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Rune
Subject: Re: inverse kinematics?
Date: 29 Mar 2001 09:16:55
Message: <3ac343d7@news.povray.org>
"Setepenaset" wrote:
> Thanks Rune! :-)

You're welcome - glad you could use it too! :)

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 28)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Reusser
Subject: Re: inverse kinematics?
Date: 29 Mar 2001 09:40:28
Message: <3AC3495D.FBF8B2EB@chorus.net>
Rune wrote:

> Are you sure? Have you actually tested it?
>
> Have you considered line 84 in my code:
>
> #declare KneeVector = Perpendiculize(KneeDirection,HipPoint-AnklePoint);

My idea was actually due to trial and error before I saw line 84, but it
still fixed the error I had when I bent the leg too far back.  When the leg
was too far back, the whole leg would flip over or give me an error if the
ankle and the hip had the same y-coord.:  shin -> \/ <-thigh.


Post a reply to this message

From: Rune
Subject: Re: inverse kinematics?
Date: 29 Mar 2001 10:02:04
Message: <3ac34e6c@news.povray.org>
"Reusser" wrote:
> My idea was actually due to trial and error before I saw
> line 84, but it still fixed the error I had when I bent the
> leg too far back.  When the leg was too far back, the whole
> leg would flip over or give me an error if the ankle and the
> hip had the same y-coord.:  shin -> \/ <-thigh.

That's because the KneeDirection have to be adjusted to fit the leg.
If the leg is like this:  shin -> \/ <-thigh.
Then the knee points downwards and thus the KneeDirection must point
downwards too. The code adjusts the KneeDirection pretty much, but it can't
read your mind - you have to tell it roughly in which direction you want the
knee to point! :)

With your method the KneeDirection is calculated automatically, but then you
just have to specify a HipAxis instead. It's not a better or worse solution,
just a different approach. Personally I find it more intuitive to specify
the KneeDirection than to specify the HipAxis.

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 28)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Reusser
Subject: Re: inverse kinematics?
Date: 29 Mar 2001 12:40:51
Message: <3AC373A3.54490BF4@chorus.net>
Rune wrote:

> That's because the KneeDirection have to be adjusted to fit the leg.
> If the leg is like this:  shin -> \/ <-thigh.
> Then the knee points downwards and thus the KneeDirection must point
> downwards too. The code adjusts the KneeDirection pretty much, but it can't
> read your mind - you have to tell it roughly in which direction you want the
> knee to point! :)
>
> With your method the KneeDirection is calculated automatically, but then you
> just have to specify a HipAxis instead. It's not a better or worse solution,
> just a different approach. Personally I find it more intuitive to specify
> the KneeDirection than to specify the HipAxis.

I agree completely, but I just found it to be a little easier with animations
when the knee direction changes and you can just let the computer do the work
instead of manually changing the direction.


Post a reply to this message

From: Rune
Subject: Re: inverse kinematics?
Date: 29 Mar 2001 15:09:30
Message: <3ac3967a@news.povray.org>
"Reusser" wrote:
> I agree completely, but I just found it to be a little easier
> with animations when the knee direction changes and you can
> just let the computer do the work instead of manually changing
> the direction.

I think perhaps generally it is easier to use the HipAxis method when the
leg movement is confined to a single plane, while with more free movements
the manual KneeDirection is more intuitive. Just a thought.

By the way, I have uploaded the scene file to my website for future
reference. (Questions like yours come up once in a while...)

http://rsj.mobilixnet.dk/3d/goodies/goodies.html

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated March 29)
/ Also visit http://www.povrayusers.org


Post a reply to this message

<<< Previous 4 Messages Goto Initial 10 Messages

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