POV-Ray : Newsgroups : povray.binaries.images : pigment checker color1 color2... color 3 Server Time
15 Nov 2024 23:22:17 EST (-0500)
  pigment checker color1 color2... color 3 (Message 1 to 4 of 4)  
From: B  Gimeno
Subject: pigment checker color1 color2... color 3
Date: 15 Feb 2006 14:54:49
Message: <43f38709@news.povray.org>
This one is an image made with an old version of pov-ray.

The pigment is very simple.
pigment {
  checker
    color 1
    color 2
    color 3
    ...
}

How could be made TODAY this effect avoiding error messages?

Thanks!

pd. Render time
with pov-ray 2.0 -not FTPov- (msdos version) 38 secs)
with pov-ray 3.6  (windows version) 34 secs

--
light_source{0,1}#macro C(r,p)cylinder{x*-2,x*2,.9 pigment { rgb
p} /* B Gimeno estoeslarealidad */ rotate p*90 } #end difference
{box {-1,1} C(z /* http://usuarios.lycos.es/game2413 */,x)C(x,y)
C(z,z) pigment{rgb 2} rotate 45 translate z*4} // www.povray.org


Post a reply to this message


Attachments:
Download 'BORRAME.jpg' (69 KB)

Preview of image 'BORRAME.jpg'
BORRAME.jpg


 

From: Mike Williams
Subject: Re: pigment checker color1 color2... color 3
Date: 15 Feb 2006 15:22:34
Message: <yvTfkZAB148DFwyG@econym.demon.co.uk>
Wasn't it B. Gimeno who wrote:
>This one is an image made with an old version of pov-ray.
>
>The pigment is very simple.
>pigment {
>  checker
>    color 1
>    color 2
>    color 3
>    ...
>}
>
>How could be made TODAY this effect avoiding error messages?

box {-4.999,4.999
  pigment {
    function {(floor(x)+floor(y)+floor(z))/3}
    colour_map{
      [0/3 rgb x]
      [1/3 rgb y]
      [2/3 rgb z]
      [3/3 rgb x]
    }
  }
}


The .999's are there to prevent the colour changes happening exactly on
a face or edge, which cause the pigment equivalent of coincident
surfaces.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Abe
Subject: Re: pigment checker color1 color2... color 3
Date: 15 Feb 2006 16:20:01
Message: <web.43f39af6694ce5897b6f9a0@news.povray.org>
Mike Williams <nos### [at] econymdemoncouk> wrote:
> Wasn't it B. Gimeno who wrote:
> >This one is an image made with an old version of pov-ray.
> >
> >The pigment is very simple.
> >pigment {
> >  checker
> >    color 1
> >    color 2
> >    color 3
> >    ...
> >}
> >
> >How could be made TODAY this effect avoiding error messages?
>
> box {-4.999,4.999
>   pigment {
>     function {(floor(x)+floor(y)+floor(z))/3}
>     colour_map{
>       [0/3 rgb x]
>       [1/3 rgb y]
>       [2/3 rgb z]
>       [3/3 rgb x]
>     }
>   }
> }
>
>
> The .999's are there to prevent the colour changes happening exactly on
> a face or edge, which cause the pigment equivalent of coincident
> surfaces.
>
> --
> Mike Williams
> Gentleman of Leisure

So elegant and concise!

My own solution was at least five times longer.
Learned something again.

Abe


Post a reply to this message

From: Mike Williams
Subject: Re: pigment checker color1 color2... color 3
Date: 15 Feb 2006 20:44:51
Message: <dqlEFEAZd98DFwmH@econym.demon.co.uk>
Wasn't it Abe who wrote:
>Mike Williams <nos### [at] econymdemoncouk> wrote:
>> Wasn't it B. Gimeno who wrote:
>> >This one is an image made with an old version of pov-ray.
>> >
>> >The pigment is very simple.
>> >pigment {
>> >  checker
>> >    color 1
>> >    color 2
>> >    color 3
>> >    ...
>> >}
>> >
>> >How could be made TODAY this effect avoiding error messages?
>>
>> box {-4.999,4.999
>>   pigment {
>>     function {(floor(x)+floor(y)+floor(z))/3}
>>     colour_map{
>>       [0/3 rgb x]
>>       [1/3 rgb y]
>>       [2/3 rgb z]
>>       [3/3 rgb x]
>>     }
>>   }
>> }
>>
>>
>> The .999's are there to prevent the colour changes happening exactly on
>> a face or edge, which cause the pigment equivalent of coincident
>> surfaces.
>>
>> --
>> Mike Williams
>> Gentleman of Leisure
>
>So elegant and concise!
>
>My own solution was at least five times longer.
>Learned something again.

Here's another completely different way to do it, that's only a few
lines longer.

box {-4.999,4.999
  pigment {
    gradient x
    colour_map{
      [1/3 rgb x]
      [1/3 rgb y]
      [2/3 rgb y]
      [2/3 rgb z]
    }
    scale 3
    warp {repeat z offset 1}
    warp {repeat y offset 1}
  }
}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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