![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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.
If I download the source to POV, where would I go looking for the code for
"average"? (I'm afraid this is likely to be the first of many questions, but
it'll do for starters).
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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.
>
> If I download the source to POV, where would I go looking for the code for
> "average"? (I'm afraid this is likely to be the first of many questions, but
> it'll do for starters).
pigment.c:
static void Do_Average_Pigments (...
But 'average' is not a pattern. That's probably also why you did not find
it.
For patterns look in pattern.c
If you want to create a new pattern, it might be useful to look for all
the changes made with #ifdef for a specific patch like:
#ifdef ObjectPatternPatch
BTW, a tool searching for keywords in all source files is quite practical
for such things.
Christoph
--
Christoph Hormann <chr### [at] gmx de>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>
> 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.
> >
I forgot to mention that such a thing is already possible for pigments if
you use pigment functions. Although it's a bit more complicated, it is
more universal, because you can also use other functions than simple
addition.
try:
#macro Add_Pigment(Pig_1, Pig_2)
#local fn_1=function { pigment { Pig_1 color_map { [0 rgb 0][1 rgb 1] }
} }
#local fn_2=function { pigment { Pig_2 color_map { [0 rgb 0][1 rgb 1] }
} }
function { fn_1(x, y, z) + fn_2(x, y, z) }
#end
#declare Pigm=
pigment {
Add_Pigment( Pigment_1, Pigment_2 )
...
}
(not tested, but it should work)
Christoph
--
Christoph Hormann <chr### [at] gmx de>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Ron Parker" <ron### [at] povray org> wrote in message
news:slr### [at] fwi com...
<snip>
Thanks - I'll give this a try. (although I'm still tempted to dip my toes in
the C).
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Christoph Hormann" <chr### [at] gmx de> wrote in message
news:3AA67E9B.9E86ACBD@gmx.de...
<snip> thanks, I'll give this a try.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |