POV-Ray : Newsgroups : povray.beta-test : transform.inc : Reorient_Trans(Axis1,Axis2) Server Time
4 Nov 2024 19:14:57 EST (-0500)
  transform.inc : Reorient_Trans(Axis1,Axis2) (Message 1 to 4 of 4)  
From: KalleK
Subject: transform.inc : Reorient_Trans(Axis1,Axis2)
Date: 5 Oct 2001 14:53:55
Message: <3bbe01c3$1@news.povray.org>
Hi!

According to the doc's this macro should align x to Axis1 and z to
Axis2.

calling Reorient_Trans(x,z) should do nothing, but it aligns x to z
and z to -x.
I think at first it was designed to align Axis1 to Axis2.
Doing animations with
 Reorient_Trans (x,vrotate (x,y*(clock*360+.1))
(".1" because Reorient_Trans (x,x) driggers an error in the macro)
and
 Reorient_Trans (vrotate (z,y*clock*360),vrotate (z,y*clock*360)
leads to the conclusion that it aligns axis1 to axis2

the first example gives a simple turning object (x is aligned to a
rotating vector)
but it should (maybe) trigger some error, because Axis1 is not in 90
degree (don't know that word "opposite of parallel" rigth now) with
Axis2, or it should shear the object.

the second example gives a still image whereas it should give a
rotating object.

if only the docs are changed according to "this aligns axis1 to
axis2" there's a proplem, that this gives infinite solutions - you can
turn your object around axis2 - every rotation is a solution for that
macro.
I'm sorry, i'm not that used to matrix's anymore to give a working
macro, but maybe the matrix-master may speak up?

If I remember correctly, this was brought up early by someone else but
noone answered, and it wasn't fixed for that old beta

cukk

win98, beta4


Post a reply to this message

From: Rune
Subject: Re: transform.inc : Reorient_Trans(Axis1,Axis2)
Date: 5 Oct 2001 16:35:27
Message: <3bbe198f@news.povray.org>
"KalleK" wrote:
> According to the doc's this macro should align x
> to Axis1 and z to Axis2.

The docs are wrong.

> I think at first it was designed to align Axis1 to Axis2.

That's correct. Well, I didn't make the macro, but it seems quite obvious.


> Reorient_Trans (x,x) driggers an error in the macro

I've fixed this. However, Reorient_Trans (x,-x) still triggers an error, and
there's no fix for that.

> but it should (maybe) trigger some error, because Axis1
> is not in 90 degree (don't know that word "opposite of
> parallel" rigth now) with Axis2, or it should shear the
> object.

I'm not sure what you mean, but I don't see any problem with the macro. It
sure isn't supposed to shear the object.

> if only the docs are changed according to "this aligns
> axis1 to axis2" there's a proplem, that this gives
> infinite solutions

"this aligns axis1 to axis2 by rotating the object around a vector
perpendicular to both axis1 and axis2."

Rune


Post a reply to this message

From: KalleK
Subject: Re: transform.inc : Reorient_Trans(Axis1,Axis2)
Date: 6 Oct 2001 06:35:46
Message: <3bbede82@news.povray.org>
> The docs are wrong.

Ok.

> > I think at first it was designed to align Axis1 to Axis2.
>
> That's correct. Well, I didn't make the macro, but it seems quite
< obvious.

Yes - I once made a same macro - without matrices, but many
rotations - and that worked that way, too.

> > Reorient_Trans (x,x) driggers an error in the macro
>
> I've fixed this. However, Reorient_Trans (x,-x) still triggers an
< error, and there's no fix for that.

According to your following suggestion for the docs your can't rotate
the object around 180 degree, because the macro can't find the *one*
vector that's perpendicular (hmm, that's the word...) to axis1 and
axis2 - a whole plane is possible...

> > but it should (maybe) trigger some error, because Axis1
> > is not in 90 degree (don't know that word "opposite of
> > parallel" rigth now) with Axis2, or it should shear the
> > object.
>
> I'm not sure what you mean, but I don't see any problem with the
< macro. It sure isn't supposed to shear the object.

I just wanted to show the different behaviour between the docs and
what it actually does. And I tried to guess what it should do with
that first example - shearing or an error - if it worked according to
the docs.  - no problem, if the docs are wrong.

> > if only the docs are changed according to "this aligns
> > axis1 to axis2" there's a proplem, that this gives
> > infinite solutions
>
> "this aligns axis1 to axis2 by rotating the object around a vector
> perpendicular to both axis1 and axis2."
>

Well, that's nice.
But after reading those docs, I maybe would like to have a macro that
works exactly the way, the docs describe Reorient_Trans for now (low
priority - one can make a workaround, i think...).

Thank you

cukk


Post a reply to this message

From: KalleK
Subject: Re: transform.inc : Reorient_Trans(Axis1,Axis2)
Date: 17 Oct 2001 16:40:50
Message: <3bcdecd2@news.povray.org>
Sorry to bug you again, but using beta 6 I get a confusing help to the
reorient_trans (it's section 7.19):
"
Reorient_Trans(Axis1, Axis2). This aligns Axis1 to Axis2 by rotating
the object around a vector perpendicular to both axis1 and axis2.
Parameters:

Axis1, Axis2 = Vectors indicating the new X and Z axes.
"

obviously the second part is a rest of the old, wrong description.

cukk


Post a reply to this message

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