POV-Ray : Newsgroups : povray.newusers : transforming vectors Server Time
6 Sep 2024 00:18:58 EDT (-0400)
  transforming vectors (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Josh English
Subject: Re: transforming vectors
Date: 20 Oct 1999 10:47:39
Message: <380DD608.72926FC4@spiritone.com>
Check out http://users.erols.com/vansickl/macs.htm on that page there is a
vmatrix macro that applies  matrix tranformations to vectors, which will
accomplish what you want to do. His explanaion of how the Matrix command works
will help out, too.

Daniel Pirch wrote:

> > > > Is it possible to apply a transformation to a single vector? (for
> instance
> > > > if my vector is <1,0,0> and my transformation is transformation is
> > > > transform{translate <2,0,0> rotate 90*z}, I want to get <0,3,0>)
> >
> > Check the docs (be sure to check the language help, not the Windows help)
> for
> > vector functions.
>
> Of course I've checked the docs before I posted my Question. I would never
> ask before doing that :-)
>
> But as vector functions, there are only vaxis_rotate, vcross, vnormalize and
> vrotate. I asked if it's possible (and HOW) to transform a vector by an
> already declared transformation. I can do this with an object:
>
> #declare MyTrans = transform{translate ... rotate ... scale ... ...}
>
> sphere{0,1 transform MyTrans}
>
> But how can I do this with vector coordinates?
>
> Thanks
> Daniel Pirch
>
> dpi### [at] gmxnet

--

Josh English
eng### [at] spiritonecom
icq 1946299
"Stress is when you wake up screaming and realize you haven't fallen asleep
yet."


Post a reply to this message

From: Margus Ramst
Subject: Re: transforming vectors
Date: 20 Oct 1999 10:57:28
Message: <380DD822.24D08595@peak.edu.ee>
It is not possible directly. You can facilitate the process by predeclarin
transformation vectors. Keep in mind the following:

object                 vector
------                 ------
scale <x,y,z>          vector * <x,y,z>
rotate <x,y,z>         vrotate(vector, <x,y,z>)
translate <x,y,z>      vector + <x,y,z>

Now declare, for example, a rotation vector, and use it both after the 'rotate'
keyword and in the 'vrotate' function.

Margus

Daniel Pirch wrote:
> 
> 
> Of course I've checked the docs before I posted my Question. I would never
> ask before doing that :-)
> 
> But as vector functions, there are only vaxis_rotate, vcross, vnormalize and
> vrotate. I asked if it's possible (and HOW) to transform a vector by an
> already declared transformation. I can do this with an object:
> 
> #declare MyTrans = transform{translate ... rotate ... scale ... ...}
> 
> sphere{0,1 transform MyTrans}
> 
> But how can I do this with vector coordinates?
> 
> Thanks
> Daniel Pirch
> 
> dpi### [at] gmxnet


Post a reply to this message

From: Chris Huff
Subject: Re: transforming vectors
Date: 20 Oct 1999 17:11:32
Message: <380E308B.72F15F42@yahoo.com>
This is why I made a patch which added a vtransform() function. :-)

vtransform(TRANSFORM, VECTOR)
Returns a vector which is the result of applying transformation
TRANSFORM to the vector VECTOR.


Post a reply to this message

From: Chris Huff
Subject: Re: transforming vectors
Date: 20 Oct 1999 21:04:56
Message: <380E673F.ACE177DD@yahoo.com>
Forgot to add this:
I will be posting the source for this in povray.programming sometime
soon, and I have sent it to Ron Parker. The disadvantage is that you
will either have to use an unofficial version, or wait until it gets
into the official POV-Ray(if it ever does...maybe POV-Ray 3.5?).


Post a reply to this message

From: Ken
Subject: Re: transforming vectors
Date: 20 Oct 1999 21:08:02
Message: <380E6706.7BC65228@pacbell.net>
Chris Huff wrote:
> 
> Forgot to add this:
> I will be posting the source for this in povray.programming sometime
> soon, and I have sent it to Ron Parker. The disadvantage is that you
> will either have to use an unofficial version, or wait until it gets
> into the official POV-Ray(if it ever does...maybe POV-Ray 3.5?).

  It almost seems to be a race now if there will be an updated version
of the SuperPatch before the official Pov v3.5 will become available.

 Any comments Ron ?


-- 
Ken Tyler -  1100+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Nieminen Juha
Subject: Re: transforming vectors
Date: 21 Oct 1999 05:07:59
Message: <380ed7ef@news.povray.org>
This is inconsistent with the other vector functions:

vrotate(VECTOR, ROTATION)
vaxis_rotate(VECTOR, AXIS, ANGLE)

but:

: vtransform(TRANSFORM, VECTOR)


-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Chris Huff
Subject: Re: transforming vectors
Date: 21 Oct 1999 08:32:17
Message: <380F0859.421E1B66@yahoo.com>
True, and I have been intending to change the order. To do that would be
very easy, and would only involve rearranging the code a little, I just
haven't done it yet.


Post a reply to this message

From: Ron Parker
Subject: Re: transforming vectors
Date: 25 Oct 1999 09:57:56
Message: <slrn818ofi.v8.parkerr@ron.gwmicro.com>
On Wed, 20 Oct 1999 18:06:14 -0700, Ken wrote:
>
>
>Chris Huff wrote:
>> 
>> Forgot to add this:
>> I will be posting the source for this in povray.programming sometime
>> soon, and I have sent it to Ron Parker. The disadvantage is that you
>> will either have to use an unofficial version, or wait until it gets
>> into the official POV-Ray(if it ever does...maybe POV-Ray 3.5?).
>
>  It almost seems to be a race now if there will be an updated version
>of the SuperPatch before the official Pov v3.5 will become available.
>
> Any comments Ron ?

Sorry, went to Minneapolis for a few days there so this is the first I've
seen this message. :)

I have a semi-finished version of the Superpatch ready to go, but I've been
slacking off on the documentation.  It doesn't have any of Chris's stuff in
it, though.


Post a reply to this message

From: Ken
Subject: Re: transforming vectors
Date: 25 Oct 1999 20:54:00
Message: <3814FB21.85DCA765@pacbell.net>
Ron Parker wrote:

> > Any comments Ron ?
> 
> Sorry, went to Minneapolis for a few days there so this is the first I've
> seen this message. :)

Is that somewhere near Minnesota ?
 
> I have a semi-finished version of the Superpatch ready to go, but I've been
> slacking off on the documentation.  It doesn't have any of Chris's stuff in
> it, though.

Well glad to hear that you ain't slackin completely :~)

Semi-finished ?

-- 
Ken Tyler -  1100+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Ron Parker
Subject: Re: transforming vectors
Date: 26 Oct 1999 08:58:10
Message: <3815a562@news.povray.org>
On Mon, 25 Oct 1999 17:51:45 -0700, Ken wrote:
>Is that somewhere near Minnesota ?

It's the suburbs of the Mall of America.

>Semi-finished ?

All the code is there, but I haven't done the splash screen yet.  Tiny little
things like that.


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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