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:28:22 EDT (-0400)
  Re: 3.2.1.6.5 in docs--clarification needed  
From: Kenneth
Date: 27 Feb 2013 16:35:01
Message: <web.512e79e1ef3a5b59c2d977c20@news.povray.org>
"Trevor G Quayle" <Tin### [at] hotmailcom> 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

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