|
|
I'm familiar with using PIGMENT/PATTERN functions, although it has been awhile.
But I was looking at 3.3.1.8.4 "Declaring User-Defined Vector Functions" in the
docs, and it's not clear to me how to actually *use* the examples given there.
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. Maybe I'm
using it in a totally wrong way? I tried all sorts of permutations in a sphere
object, but NONE of them work-- all fatal errors. (Some of these are probably
nonsense, but I wanted to be thorough.) Can someone give an example of the
correct way to use myvector-- in a sphere, or in some other way altogether? I'm
obviously not grasping the underlying idea.
sphere{0,.3
// myvector
// or...
//my_vector(4,3,7)
// or...
//transform{myvector}
// or...
//transform{myvector(4,3,7)}
// or...
//transform{myvector(x,y,z)}
// or...
//function{myvector}
// or...
//function(x,y,z){myvector}
// or...
//foo
// or...
//foo(4,3,7)
// or...
//function{foo}
// or...
//function(x,y,z){foo}
// or..
//transform{foo}
// or...
//transform{foo(4,3,7)}
// or...
//transform{ <myvector.x,my-vector.y,myvector.z>}
// or... ??
pigment{ rgb <0,1,0>}
}
Post a reply to this message
|
|