POV-Ray : Newsgroups : povray.general : checkered passed : Re: checkered passed Server Time
8 Aug 2024 22:12:49 EDT (-0400)
  Re: checkered passed  
From: Chris Huff
Date: 17 Nov 2000 18:40:25
Message: <chrishuff-99CE81.18404217112000@news.povray.org>
In article <chrishuff-9268FA.17205617112000@news.povray.org>, Chris 
Huff <chr### [at] maccom> wrote:

> I'm not sure which conversion is used... I will check this out later...

The GREY_SCALE() macro is used, which uses the function:
Gray = 0.297*R + 0.589*G + 0.114*B
I have changed this to use (R+G+B)/3 in my version.


> I have been planning this function as part of the color conversion 
> patch

And just finished doing it.


> POV doesn't always use the same conversion function.

I used the GREY_SCALE() macro mentioned above. You could also use the 
convert_color() function with HSL or HSV to get a grayscale 
representation...just extract the right channel.
BTW, I named the function "grayscale()", I suppose someone is going to 
want "greyscale()" to be added too...

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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