POV-Ray : Newsgroups : povray.advanced-users : rotations inherent in reorientation? Server Time
1 Nov 2024 15:26:13 EDT (-0400)
  rotations inherent in reorientation? (Message 1 to 5 of 5)  
From: Greg M  Johnson
Subject: rotations inherent in reorientation?
Date: 26 Jul 2002 14:41:42
Message: <3d4197e6$1@news.povray.org>
Please see my swim cycle animation posted to p.b.a  on 7/21/02.
Note the rotation of the wrists.

My forearms are transformed via:
#declare rforearmtrans=transform{Oritransform(rwristpt-relbowpt,-y) rotate
<0,rwristang.y,0> Oritransform(-y,rtempwristpt-rtempelbowpt) translate
rtempelbowpt}

#declare lforearmtrans=transform{Oritransform(lwristpt-lelbowpt,-y) rotate
<0,lwristang.y,0> Oritransform(-y,ltempwristpt-ltempelbowpt) translate
ltempelbowpt}

For weeks I've tried to figure out what the bug is. But I'm wondering if
this rotation is "built-in" to the orientation.

The wristpt and elbowpt are constants based on measurements I made on a
skeleton.
The wristang is a constant vector (but i get the same results even when I
comment this out).
The tempelbowpt is calculated using FindKnee of Rune and/or JvS and an elbow
orientation vector that is constant.
The tempwristpt is a user-defined function of the clock.
The Oritransform is by JvS.

In other words, I:
i)  rotate from a position based on a skeleton (drawing in 3 dimensions) to
downward,
ii) rotate the wrists about the y axis,
iii) then reorient to a new position based on the FindKnee's new elbow point
and user-defined position for the wrist
iv) translate to new elbow point.


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: rotations inherent in reorientation?
Date: 26 Jul 2002 18:06:45
Message: <3D41C863.3026983E@hotmail.com>
Greg,

I'm not sure exactly which of John's macros you use.

If you use John's Axis_Rotate_Trans() macro, then please
note that it seems to fail with these input vectors:

<1, -1, 1> and <-1, 1, -1>

- and all vectors parallel to them.

I suggest that you use the transformation macros in the
"transforms.inc" file that comes with POV-Ray v3.5 instead.
(I.e. Axis_Rotate_Trans(), Reorient_Trans() etc.)

The thread "Bug in Knee macro?" may also be useful reading:

http://news.povray.org/povray.advanced-users/6074/
(In povray.advaced-users 4. Feb. 2001 by Rune)

I have not looked much at your code below. But if the above
information does not help, then I suspect that you need to
show more of your code.


Tor Olav


"Greg M. Johnson" wrote:
> 
> Please see my swim cycle animation posted to p.b.a  on 7/21/02.
> Note the rotation of the wrists.
> 
> My forearms are transformed via:
> #declare rforearmtrans=transform{Oritransform(rwristpt-relbowpt,-y) rotate
> <0,rwristang.y,0> Oritransform(-y,rtempwristpt-rtempelbowpt) translate
> rtempelbowpt}
> 
> #declare lforearmtrans=transform{Oritransform(lwristpt-lelbowpt,-y) rotate
> <0,lwristang.y,0> Oritransform(-y,ltempwristpt-ltempelbowpt) translate
> ltempelbowpt}
> 
> For weeks I've tried to figure out what the bug is. But I'm wondering if
> this rotation is "built-in" to the orientation.
> 
> The wristpt and elbowpt are constants based on measurements I made on a
> skeleton.
> The wristang is a constant vector (but i get the same results even when I
> comment this out).
> The tempelbowpt is calculated using FindKnee of Rune and/or JvS and an elbow
> orientation vector that is constant.
> The tempwristpt is a user-defined function of the clock.
> The Oritransform is by JvS.
> 
> In other words, I:
> i)  rotate from a position based on a skeleton (drawing in 3 dimensions) to
> downward,
> ii) rotate the wrists about the y axis,
> iii) then reorient to a new position based on the FindKnee's new elbow point
> and user-defined position for the wrist
> iv) translate to new elbow point.


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: rotations inherent in reorientation?
Date: 26 Jul 2002 18:14:39
Message: <3D41CA3F.18408666@hotmail.com>
Tor Olav Kristensen wrote:
> 
> Greg,
> 
> I'm not sure exactly which of John's macros you use.
> 
> If you use John's Axis_Rotate_Trans() macro
>...

John named his macro "AxisRotate()" not "Axis_Rotate_Trans()".

Sorry about that.


Tor Olav


Post a reply to this message

From: Greg M  Johnson
Subject: Re: rotations inherent in reorientation?
Date: 26 Jul 2002 21:47:24
Message: <3d41fbac@news.povray.org>
This *cough*  question about vector algebra  *cough* comes from experience
with mega 0.7.

Thanks for the update. I'm now using that one. But it didn't help.

The code is very complex and so for the moment I guess I'll keep scratching
my head.

But from the simple vector calculus, there's no inherent rotation, right?


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: rotations inherent in reorientation?
Date: 29 Jul 2002 19:54:17
Message: <3D45D60D.3096F20D@hotmail.com>
"Greg M. Johnson" wrote:
> 
> This *cough*  question about vector algebra  *cough* comes from experience
> with mega 0.7.
> 
> Thanks for the update. I'm now using that one. But it didn't help.
> 
> The code is very complex and so for the moment I guess I'll keep scratching
> my head.
> 
> But from the simple vector calculus, there's no inherent rotation, right?

I do not understand your question Greg.


Did you try something like this ?

#version 3.5;
#include "transforms.inc"

#declare pRightWrist =
#declare pRightElbow =
#declare pTempRightElbow =
#declare RightWristAngle =

#declare vRightForearm = pRightWrist - pRightElbow;

#declare RightForearmTransform =
  transform {
    Axis_Rotate_Trans(vRightForearm, RightWristAngle.y)
    translate pTempRightElbow
  }


Tor Olav


Post a reply to this message

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