POV-Ray : Newsgroups : povray.newusers : 3d color function : 3d color function Server Time
30 Jul 2024 02:27:48 EDT (-0400)
  3d color function  
From: Bernd Fuhrmann
Date: 21 Nov 2004 15:50:36
Message: <41a0ff9c@news.povray.org>
Hi!

I'd like to do something like this:

I've got three functions f_r, f_g and f_b, which all map [0,1]^3 to 
[0,1]. Now I'd like to have a rather complex object (don't worry, I know 
how to make that geometry) that are all bounded by a box {<0,0,0> 
<1,1,1>} where each point of that object has the color rgb <f_r(x,y,z), 
f_g(x,y,z), f_b(x,y,z)>.

I'd like to declare a material for that complex object, but how do I do 
that?

I already tried this:

#declare MyMaterial =
material{texture{pigment{
function {f_r(x, y, z)}
}}}

But this will only give my grayscales. How can I make colored?

f_r, f_g and f_b are nonlinear so gradients would work (I guess).

Thanks in advance,
Bernd Fuhrmann


Post a reply to this message

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