POV-Ray : Newsgroups : povray.general : Turning of green and blue in a declared pigment pattern Server Time
27 Nov 2024 03:24:27 EST (-0500)
  Turning of green and blue in a declared pigment pattern (Message 1 to 3 of 3)  
From: gregjohn
Subject: Turning of green and blue in a declared pigment pattern
Date: 2 May 2009 14:40:00
Message: <web.49fc92ab218005a434d207310@news.povray.org>
I've got a declared pigment pattern.  I want to have another pigment that is
only the red component of that pattern, AND is *red*. I tried some things  with
multiplying functions, but povray kept turning it into a pigment that is *white*
when the original is red.

Any ideas?


Post a reply to this message

From: Mike Williams
Subject: Re: Turning of green and blue in a declared pigment pattern
Date: 2 May 2009 15:14:44
Message: <$gI5OKAZuJ$JFwzD@econym.demon.co.uk>
Wasn't it gregjohn who wrote:
>I've got a declared pigment pattern.  I want to have another pigment that is
>only the red component of that pattern, AND is *red*. I tried some things  with
>multiplying functions, but povray kept turning it into a pigment that 
>is *white*
>when the original is red.

This creates a pigment where the B and G components are always zero, and 
the R component is from the original pigment:

#declare f=function{pigment {p}}
#declare p2 = pigment{function{f(x,y,z).red}
      colour_map {[0 rgb 0][1 rgb <1,0,0>]}}

red => red
blue => black
green => black
white => red

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Alain
Subject: Re: Turning of green and blue in a declared pigment pattern
Date: 4 May 2009 22:44:35
Message: <49ffa813$1@news.povray.org>
gregjohn nous illumina en ce 2009-05-02 14:36 -->
> I've got a declared pigment pattern.  I want to have another pigment that is
> only the red component of that pattern, AND is *red*. I tried some things  with
> multiplying functions, but povray kept turning it into a pigment that is *white*
> when the original is red.
> 
> Any ideas?
> 
> 
Another way of doing the same thing : Multiply your resulting pigment by <1,0,0>


Post a reply to this message

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