|
![](/i/fill.gif) |
"Trevor G Quayle" <Tin### [at] hotmail com> wrote:
>
> #declare foo = function {
> pigment {
> color red 1
> }
> }
>
> as the pigment is red anywhere, any value will return rgb value <1,0,0>.
The very simplicity of that one was a source of confusion as well--I came to the
same conclusion as you mention, which didn't make much practical sense. IMO,
that particular function might be more 'useful' (as a 'very simple example') if
the pigment was, say, rgb <1,.3,.7>.
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.)
Post a reply to this message
|
![](/i/fill.gif) |