POV-Ray : Newsgroups : povray.general : converting rgb to spectra : Re: converting rgb to spectra Server Time
9 Aug 2024 03:26:18 EDT (-0400)
  Re: converting rgb to spectra  
From: Vahur Krouverk
Date: 21 Aug 2000 11:51:21
Message: <39A15022.1157D2F4@aetec.ee>
Remco Poelstra wrote:
> 
> Hi,
> 
> I saw in a message from Peter Popov in reply to Feature request for
> pov3.5 (08/09/00 16:55), that rgb can be converted to spectra. That's
> what I need., since I want to convert the rgb value to a corresponding
> audio frequentie, and audio is spectra. Where can I find more
> information on doing so? (I'm a newbie on complex math, so it should be
> a little bit easy explained.)
> 
> Remco Poelstra

I don't think that you'll need complex math for this. In MegaPov source
code there is function (RGBtoHue in color.c)from MSGTracer, which
converts RGB to visible spectra (although part of it is commented out,
but You can get idea). Basically you should convert RGB to hue, then
convert hue to frequency (or wave length).


Post a reply to this message

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