POV-Ray : Newsgroups : povray.newusers : vaxis_rotate Server Time
5 Sep 2024 02:14:29 EDT (-0400)
  vaxis_rotate (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
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

From: Tom Melly
Subject: Re: vaxis_rotate
Date: 17 Jul 2002 12:29:30
Message: <3d359b6a$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:3d359a2b@news.povray.org...
>
>   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?
>

Ooo, great minds think alike!

(now, who else can I insult?).


Post a reply to this message

From: TinCanMan
Subject: Re: vaxis_rotate
Date: 17 Jul 2002 13:01:31
Message: <3d35a2eb@news.povray.org>
> 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....

#macro vaxis_rotate_extra(A,B,C,D)
  (B+vaxis_rotate(A-B,C-B,D))
#end

-tgq


Post a reply to this message

From: Christopher James Huff
Subject: Re: vaxis_rotate
Date: 17 Jul 2002 13:13:55
Message: <chrishuff-EF7684.12084417072002@netplex.aussie.org>
In article <3d359a2b@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   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?

Well, it isn't hard, just:
Orig + vaxis_rotate(Pt - Orig, Axis, Amt)

Since there is a Rotate_Around_Trans() macro and an Axis_Rotate_Trans() 
macro, I guess a Axis_Rotate_Around_Trans() macro wouldn't be out of 
place, though I'm not sure how useful it would be. How about:

#macro Axis_Rotate_Around_Trans(Orig, Axis, Amt)
    transform {
        translate -Orig
        Axis_Rotate_Trans(Axis, Amt)
        translate Orig
    }
#end

-- 
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 16:33:05
Message: <3d35d481@news.povray.org>
Christopher James Huff <chr### [at] maccom> wrote:
> Orig + vaxis_rotate(Pt - Orig, Axis, Amt)

  I was thinking more in the lines of "rotate around the axis which goes
through these two points". However, it's rather easy to modify that
expression to do that.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Christopher James Huff
Subject: Re: vaxis_rotate
Date: 17 Jul 2002 19:43:33
Message: <chrishuff-6BF804.18382317072002@netplex.aussie.org>
In article <3d35d481@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   I was thinking more in the lines of "rotate around the axis which goes
> through these two points". However, it's rather easy to modify that
> expression to do that.

Ax1 + vaxis_rotate(Pt - Ax1, Ax2 - Ax1, Amt)

I prefer a point and direction, because it more clearly specifies the 
direction of the axis. With two points, the direction depends on the 
order of the end point vectors, which is workable but possibly more 
confusing. Also, I was making it similar as possible to the 
vaxis_rotate() function.

-- 
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

<<< Previous 5 Messages Goto Initial 10 Messages

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