Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!uwm.edu!rutgers!njin!princeton!phoenix!gauss!markv From: markv@gauss.Princeton.EDU (Mark VandeWettering) Newsgroups: comp.graphics Subject: Re: Colors of the Rainbow Message-ID: <12655@phoenix.Princeton.EDU> Date: 4 Jan 90 15:31:41 GMT References: <2284@isaak.isa.de> Sender: news@phoenix.Princeton.EDU Reply-To: markv@gauss.Princeton.EDU (Mark VandeWettering) Organization: Princeton University Lines: 21 In article <2284@isaak.isa.de> schwarze@isaak.uucp (Jochen Schwarze) writes: >I want to display the color spectrum of a rainbow. The wavelengths >of visible light approximately run from 400 nm to 800 nm. So I'm >looking for a function that maps a wavelength to the appropriate RGB >triple. Has anybody done this? Any pointers appreciated. Nope. Nobody has done this. :-) Okay, okay. If I wasn't going to help, I wouldn't post. Dusting off some of my books on the shelf, I see the traditional (if a text that was only published last year can be traditional) solution for me. Roy Hall, "Illumination and Color in Computer Generated Imagery" 1989 Springer-Verlag, ISBN 0-387-96774-5 Hall presents source code to precisely what you wish. I believe that you can even ftp the source from freedom.graphics.cornell.edu. (Yup, I just checked, in pub/Hall) Mark VandeWettering