  | 
  | 
 
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
According to the docs (6.1.5.5), the following should be okay, but I get an
error...
#declare PigTest = pigment{color <1,1,0> + blue 1}
Any ideas?
Assuming I've done something stupid, will the correct syntax allow me to add a
filter component to a pigment map?
e.g.
#declare MyPig =
pigment{
    bozo
    pigment_map{
        [0 rgb<1,1,0>]
        [1 rgb<1,0,1>]
    }
}
#declare MyPig2=pigment{MyPig filter 0.5}
-- 
#macro A(V,B,C,R)#while(B-256)#if(V-128/B>=0)sphere{0,.5translate<C-4R-1,9>
pigment{rgb<1-C/8R/2C/8>}}#local V=V-128/B;#end#local B=B*2;#local C=C+1;#
end#end A(234,1,0,2)A(85,1,0,1)A(81,1,0,0)light_source{-5 1}//Tom Melly
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
Wasn't it Tom Melly who wrote:
>According to the docs (6.1.5.5), the following should be okay, but I get an
>error...
>
>#declare PigTest = pigment{color <1,1,0> + blue 1}
>
>Any ideas?
But you can do things like
#declare Blue = <0,0,1>;
#declare PigTest = pigment{color <1,1,0> + Blue}
>Assuming I've done something stupid, will the correct syntax allow me to add a
>filter component to a pigment map?
>
>e.g.
>
>#declare MyPig =
>pigment{
>    bozo
>    pigment_map{
>        [0 rgb<1,1,0>]
>        [1 rgb<1,0,1>]
>    }
>}
>
>#declare MyPig2=pigment{MyPig filter 0.5}
You can add a colour to a colour, like 
#declare HalfFilter = <0,0,0,0.5>;
#declare PigTest = pigment{color <1,1,0> + HalfFilter}
But to add a colour to a more complicated pigment, I think you have to
use a more complicated syntax, like:
#declare Clear = rgbf 1;
#declare MyPig2=pigment{
  average pigment_map {
    [1.0 MyPig]
    [1.0 Clear]
}}
-- 
Mike Williams
Gentleman of Leisure
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
"Tom Melly" <tom### [at] tomandlu co uk> wrote in message
news:3fdf380d$1@news.povray.org...
> According to the docs (6.1.5.5), the following should be okay, but I get
an
> error...
>
> #declare PigTest = pigment{color <1,1,0> + blue 1}
Interesting... yes, I thought that would have been valid. Can still use z or
<0,0,1> in place of blue 1. Like + z*0.5 if you only wanted half blue.
Curious thing though that color keywords aren't able to be used and yet show
it to be valid in the Doc. Something to check into.
> Assuming I've done something stupid, will the correct syntax allow me to
add a
> filter component to a pigment map?
Seems like Mike Williams has a good solution anyway. I think once you are
dealing with a pattern it isn't going to accept color keywords directly.
Bob H.
 
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
"Mike Williams" <nos### [at] econym demon co uk> wrote in message
news:8o9H2CApQ23$EwYB@econym.demon.co.uk...
<snip>
Thanks Mike.
 
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
"Hughes, B." <omn### [at] charter net> wrote in message
news:3fdf6de1$1@news.povray.org...
>
> Interesting... yes, I thought that would have been valid.
> it to be valid in the Doc. Something to check into.
>
I'll post in general to ask whether it's a bug in docs or a bug in pov.
 
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
In article <3fdf380d$1@news.povray.org>,
 "Tom Melly" <tom### [at] tomandlu co uk> wrote:
> According to the docs (6.1.5.5), the following should be okay, but I get an
> error...
> 
> #declare PigTest = pigment{color <1,1,0> + blue 1}
"blue" isn't a value you can add to a color vector, it is a keyword 
specifying the blue color channel, in the same class as "rgb" or "rgbft".
> Assuming I've done something stupid, will the correct syntax allow me to add a
> filter component to a pigment map?
No. However, you can use the average pattern to combine the old pigment 
with a new, transparent one...just make sure you double the colors in 
both pigments first.
-- 
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
 
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 
 | 
  |