POV-Ray : Newsgroups : povray.general : 3.2.1.6.5 in docs--clarification needed : Re: 3.2.1.6.5 in docs--clarification needed Server Time
29 Jul 2024 10:24:56 EDT (-0400)
  Re: 3.2.1.6.5 in docs--clarification needed  
From: clipka
Date: 27 Feb 2013 19:34:35
Message: <512ea61b@news.povray.org>
Am 27.02.2013 22:32, schrieb Kenneth:

> In the v3.62 docs section 3.2.1.6.4  "Declaring User-Defined Vector Functions"
> (immediately preceding the one I mentioned), there's another similar(??)
> example...
>
>   #declare foo = function {
>     transform {
>       rotate <90, 0, 0>
>       scale 4
>     }
>   }
>
>   #declare myvector = foo(4, 3, 7);
>
> Would myvector ever return anything other than rotate <90,0,0> and scale 4? Or
> am I still totally confused? (BTW, the spline function example in that section
> *does* make sense to me, if I'm grasping the fundamental idea correctly.)

The example is equivalent to

#declare fooTrans = transform {
   rotate <90, 0, 0>
   scale 4
}

#declare myvector = vtransform(<4,3,7>, fooTrans);

i.e. the function interprets the three parameters as coordinates in 3D 
space, rotates the corresponding point by 90 degrees around the x axis, 
and scales it by a factor of 4.


Post a reply to this message

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