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

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