POV-Ray : Newsgroups : povray.unofficial.patches : new pattern help : Re: new pattern help Server Time
1 Sep 2024 16:20:06 EDT (-0400)
  Re: new pattern help  
From: Ron Parker
Date: 7 Mar 2001 14:22:18
Message: <slrn9ad2jc.65c.ron.parker@fwi.com>
On 7 Mar 2001 14:12:53 -0500, Ron Parker wrote:
>On Wed, 7 Mar 2001 17:11:42 -0000, Tom Melly wrote:
>>I am feeling vaguely inspired to try making a new pattern type.
>>
>>It would be almost indentical to "average" but would add values rather than
>>average them.
>
>You could just use average but multiply all of the color values in your
>pigments by the number of pigments you're averaging.

Here's an example:

#declare pig1 = pigment {bozo color_map {[0 rgb 0][1 red 3]} 
    translate 0 scale .2}
#declare pig2 = pigment {bozo color_map {[0 rgb 0][1 blue 3]} 
    translate 50 scale .2}
#declare pig3 = pigment {bozo color_map {[0 rgb 0][1 green 3]} 
    translate 100 scale .2}
#declare pig4 = pigment {average pigment_map {[1 pig1][1 pig2][1 pig3]}}

sphere {0,2 texture {pigment {pig4} finish {ambient 1}}}
camera {location -5*z look_at 0}

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

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