|
|
Am 2/25/2018 um 20:18 schrieb Kenneth:
> The first example (a transform function) is described only like this:
>
> #declare foo = function {
> transform {
> rotate <90, 0, 0>
> scale 4
> }
> }
>
> #declare myvector = foo(4, 3, 7);
>
> How is "myvector" supposed to be used? My assumption is that it 'acts
like' a
> transform-- just like any transform{..}-- but I can't get it to work.
No, "myvector" (as its name suggest) is just a vector. Its the result of
the vector <4, 3, 7> with the transformation "foo" applied.
In this case it is simple to calculate: <16, -28, 12>
So
sphere {myvector, 0.3
pigment {rgb <0,1,0>}
}
or
sphere {foo(4, 3, 7), 0.3
pigment {rgb <0,1,0>}
}
works and will position the sphere at <16, -28, 12>.
Post a reply to this message
|
|