Convert frequency to RGB

Dar Scott dsc at swcp.com
Mon Aug 11 13:26:01 EDT 2003


On Sunday, August 10, 2003, at 10:03 AM, Jim Hurley wrote:

> I am trying to create the effect of gradually running through all  
> colors of the visible spectrum.

Maybe you can scan in a picture you like and then use the imageData as  
your table.

There are several factors:  Sun color, eye response tristimulus values  
or chramaticity coordinates (see CIE), phosphor colors and the effect  
of faking colors outside what the phosphors can do.  I don't know much  
about phosphors, but I can provide some info on the sun and on CIE data.

For your effect, you might want to see if a simplification works.

You should be fine with straight-line approximations between RGB  
colors.  Do this by making a straight-line interpolation of each  
component.  Create a table from wavelength (or lightspeed number or  
whatever) to color.  Maybe three arrays will work.

If you need help in getting even rough data for your table, let me know.

Dar

************************************************************************ 
****
   Dar Scott Consulting    http://www.swcp.com/dsc/    Programming  
Services
************************************************************************ 
****




More information about the use-livecode mailing list