|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |