POV-Ray : Newsgroups : povray.general : Function returns 3d vector : Function returns 3d vector Server Time
31 Jul 2024 16:24:24 EDT (-0400)
  Function returns 3d vector  
From: Ben Chambers
Date: 21 Nov 2006 02:51:34
Message: <4562b006@news.povray.org>
I'm certain this has been asked before, but I can't seem to find it (or 
figure it out from the docs).

All of my user defined functions return a float value.  How can I write 
a function that returns a 3d vector?

The context is simply a pigment block.  What I want is something like this:

#declare f1=...
#declare f2=...
#declare f3=...
pigment {color rgb <f1(x,y,z), f2(x,y,z), f3(x,y,z)>]

Of course, I'd be happy declaring only 1 function if it allowed me this 
functionality (no pun intended!).

...Chambers


Post a reply to this message

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