|
|
Hi val,
> "PM 2Ring" <nomail@nomail> wrote:
> > Here's one possibility below. You may also like to know that POV can cope
> > with negative colour values. I'll post a relevant example soon.
>
> Thanks. It works! It took me a couple of days to realize that
> the function should span in RGB components:
>
> #declare fun_x = function { color_x*max(0, (sx*(x-px) + sy*(y-py) +
> sz*(z-pz))/raio) + color_x*amb }
> #declare fun_y = function { color_y*max(0, (sx*(x-px) + sy*(y-py) +
> sz*(z-pz))/raio) + color_y*amb }
> #declare fun_z = function { color_z*max(0, (sx*(x-px) + sy*(y-py) +
> sz*(z-pz))/raio) + color_z*amb }
>
> #declare PigRGB =
> pigment{
> average
> pigment_map {
> [1 function{fun_x(x,y,z)} color_map{[0 rgb 0][1 red 3]}]
> [1 function{fun_y(x,y,z)} color_map{[0 rgb 0][1 green 3]}]
> [1 function{fun_z(x,y,z)} color_map{[0 rgb 0][1 blue 3]}]
> }
> }
> Val
Great! I forgot about cleaning up my negative colours example, but in the
mean time I'll post a related pigment function example in p.b.i., thread
"Pigment Functions". This one lets you do a fake MC Escher "Circle Limit"
effect, using stereographic projection.
Post a reply to this message
|
|