POV-Ray : Newsgroups : povray.newusers : transforming vectors : Re: transforming vectors Server Time
5 Sep 2024 20:17:12 EDT (-0400)
  Re: transforming vectors  
From: Josh English
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

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