POV-Ray : Newsgroups : povray.advanced-users : vlength( ) : Re: vlength( ) Server Time
30 Jul 2024 08:22:26 EDT (-0400)
  Re: vlength( )  
From: Tor Olav Kristensen
Date: 16 Jun 2000 16:21:35
Message: <394A8C26.9378A1C8@online.no>
SamuelT wrote:
> 
> It's for the eval_pigment stuff I've been using. I needed to convert a color
> vector into a float value so I could use it for elevation. The best way I
> could think of doing this would be averaging the components of the color
> vector. I'm now using a macro instead of vlength, and it works great.


I see that Ron Parker and Warp already have suggested some conversion 
formulas for your problem.

Here are links to some more info about such formulas:


http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html
(Look at the end of item 5.2 - HSL, HSV)

(Rewritten html version of above page ?)
http://members.xoom.fr/scorpion/docs/txt/color_faq.html
(9.2 - Color look-up table to a gray scales)


http://www.inforamp.net/~poynton/notes/colour_and_gamma/ColorFAQ.html#RTFToC9


Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

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