POV-Ray : Newsgroups : povray.newusers : vaxis_rotate Server Time
26 Dec 2024 12:58:17 EST (-0500)
  vaxis_rotate (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Rob Brown-Bayliss
Subject: vaxis_rotate
Date: 16 Jul 2002 22:43:24
Message: <3d34d9cc@news.povray.org>
Hi, I used the following, and obviously expected it to work as I wanted
but it didn't	

#local d1link2 = vaxis_rotate(<-7,0,5>,<0,0,5>,steer);
#local d2link2 = vaxis_rotate(<-7,0,-5>,<0,0,-5>,steer);

So I am wondering if there is a way to choose which axis it rotates
around?


Post a reply to this message

From: Tom Melly
Subject: Re: vaxis_rotate
Date: 17 Jul 2002 06:51:34
Message: <3d354c36$1@news.povray.org>
"Rob Brown-Bayliss" <rob### [at] zoismorg> wrote in message
news:3d34d9cc@news.povray.org...
> Hi, I used the following, and obviously expected it to work as I wanted
> but it didn't
>
> #local d1link2 = vaxis_rotate(<-7,0,5>,<0,0,5>,steer);
> #local d2link2 = vaxis_rotate(<-7,0,-5>,<0,0,-5>,steer);
>
> So I am wondering if there is a way to choose which axis it rotates
> around?

vaxis_rotate rotates returns the position of the first point if you rotated it
around the second point using the 3rd parameter as the amount to rotate.

Obviously, the second point doesn't describe an axis direction on its own - the
axis is defined as perpendicular to a line connecting the first and second
points, and passing through the second point.

What's it doing that you don't expect?


Post a reply to this message

From: TinCanMan
Subject: Re: vaxis_rotate
Date: 17 Jul 2002 07:58:05
Message: <3d355bcd@news.povray.org>
> > #local d1link2 = vaxis_rotate(<-7,0,5>,<0,0,5>,steer);
> > #local d2link2 = vaxis_rotate(<-7,0,-5>,<0,0,-5>,steer);
> >
> > So I am wondering if there is a way to choose which axis it rotates
> > around?
>
> vaxis_rotate rotates returns the position of the first point if you
rotated it
> around the second point using the 3rd parameter as the amount to rotate.
>
> Obviously, the second point doesn't describe an axis direction on its
own - the
> axis is defined as perpendicular to a line connecting the first and second
> points, and passing through the second point.
>
> What's it doing that you don't expect?
>
I think you have it wrong here.  In 3D, there is no one vector that is
perpendicular to a given vector,  it can be any vector on the plane which is
perpendicular to the first so it coudn't possibly do what you describe
(unless I misunderstand).
What the function vaxis_rotate(A,B,F) appears to do from my understanding is
rotate pt A around the vector defined by B that passes through the origin
<0,0,0>, by the angle F in degrees.
ie. vaxis_rotate(<0,1,0>,<0,0,1>,90) gives <-1,0,0>, likewise
vaxis_rotate(<0,1,0>,<0,0,10>,90) gives the same result.

-tgq


Post a reply to this message

From: Tom Melly
Subject: Re: vaxis_rotate
Date: 17 Jul 2002 08:24:07
Message: <3d3561e7$1@news.povray.org>
"TinCanMan" <Tin### [at] hotmailcom> wrote in message
news:3d355bcd@news.povray.org...

> I think you have it wrong here.  In 3D, there is no one vector that is

<verysmallvoice> Yes, I am... </verysmallvoice>


Post a reply to this message

From: Warp
Subject: Re: vaxis_rotate
Date: 17 Jul 2002 11:16:36
Message: <3d358a53@news.povray.org>
TinCanMan <Tin### [at] hotmailcom> wrote:
> What the function vaxis_rotate(A,B,F) appears to do from my understanding

  Hmm... I don't understand how this is not crystal clear. What else would
it do?
  The vector B defines the axis around which the point A is rotated F degrees.
Simple.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: TinCanMan
Subject: Re: vaxis_rotate
Date: 17 Jul 2002 11:31:46
Message: <3d358de2$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3d358a53@news.povray.org...
> TinCanMan <Tin### [at] hotmailcom> wrote:
> > What the function vaxis_rotate(A,B,F) appears to do from my
understanding
>
>   Hmm... I don't understand how this is not crystal clear. What else would
> it do?
>   The vector B defines the axis around which the point A is rotated F
degrees.
> Simple.

I suppose it is now that Tom has admitted his mistake.  I just get wary when
someone says something contrary to what I thought was true and start
wondering if maybe I'm making the mistake or them.
-tgq


Post a reply to this message

From: Tom Melly
Subject: Re: vaxis_rotate
Date: 17 Jul 2002 11:57:34
Message: <3d3593ee$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:3d358a53@news.povray.org...
>
>   Hmm... I don't understand how this is not crystal clear. What else would
> it do?
>   The vector B defines the axis around which the point A is rotated F degrees.
> Simple.

Well, a single vector cannot define an axis, so "crystal clear" it ain't. I
would agree that, on reflection, the axis running from <0,0,0> to B is the only
logical conclusion, but it is not stated in the docs afaik.


Post a reply to this message

From: Christopher James Huff
Subject: Re: vaxis_rotate
Date: 17 Jul 2002 12:09:52
Message: <chrishuff-C48FC9.11043917072002@netplex.aussie.org>
In article <3d3593ee$1@news.povray.org>,
 "Tom Melly" <tom### [at] tomandlucouk> wrote:

> Well, a single vector cannot define an axis, so "crystal clear" it ain't.

Yes it can...think about it a bit. An axis is just a direction, so you 
only need one vector to represent it.
It is used elsewhere as well...the normal vector of a plane; the 
predefined x, y, and z vectors; etc.


> I would agree that, on reflection, the axis running from <0,0,0> to B 
> is the only logical conclusion, but it is not stated in the docs 
> afaik.

It isn't stated because it is fairly obvious. Why should vaxis_rotate() 
have a different origin? Nothing else does. You seem to be thinking of a 
ray for some reason.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Warp
Subject: Re: vaxis_rotate
Date: 17 Jul 2002 12:24:12
Message: <3d359a2b@news.povray.org>
Christopher James Huff <chr### [at] maccom> wrote:
> It isn't stated because it is fairly obvious. Why should vaxis_rotate() 
> have a different origin? Nothing else does. You seem to be thinking of a 
> ray for some reason.

  On the other hand, it would sometimes be useful to be able to rotate
a point/object around an axis *not* going through the origin. Is there
a standard macro for this?

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Tom Melly
Subject: Re: vaxis_rotate
Date: 17 Jul 2002 12:28:36
Message: <3d359b34$1@news.povray.org>
"Christopher James Huff" <chr### [at] maccom> wrote in message
news:chr### [at] netplexaussieorg...

<snip>

Well, we've established I'm a dimwit....

Okay, how about someone writes a nice vaxis_rotate_extra(A,B,C,D)  function
where A is the point to rotate, around an axis defined by B and C, and D being
the amount. I suspect that this is what Rob B-B wanted....


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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