|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
No, this has nothing to do with spectral rendering. Sorry to disappoint.
______________________________________________________________________
#include "CIE.inc"
#declare SHORTEST = 378;
#declare LONGEST = 826;
#declare STEP = 2;
#declare Max = 0;
#declare c_Values = array [(LONGEST - SHORTEST) / STEP + 1]
#local I = 0;
#for (Wl, SHORTEST, LONGEST, STEP)
#declare c_Values[I] = MapGamut (Wavelength2RGB (Wl));
#declare Max = max (Max, c_Values[I].x, c_Values[I].y, c_Values[I].z);
#local I = I + 1;
#end
#declare cm_Spectrum = color_map
{ #local I = 0;
#for (Wl, SHORTEST, LONGEST, STEP)
[Wl/1000 rgb c_Values[I] / Max]
#local I = I + 1;
#end
}
#declare p_Spectrum = pigment { gradient x color_map { cm_Spectrum } }
______________________________________________________________________
P.S. Macro MapGamut() has the same pass-by-reference issue that CH2RGB() used
to have. (See "CH2RGB somehow causes infinite loop" in p.general.)
Post a reply to this message
Attachments:
Download 'ls4_spectrum_montage1.png' (16 KB)
Preview of image 'ls4_spectrum_montage1.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Oh yeah, if the #for keyword didn't give it away, you need POV-Ray 3.7 (or
manually convert the #for loops to #while loops).
Here is a graph of the sRGB primaries as a function of wavelength.
Post a reply to this message
Attachments:
Download 'ls4_spectrum2rgb.png' (33 KB)
Preview of image 'ls4_spectrum2rgb.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 04/10/12 04:12, Cousin Ricky wrote:
> #for
What? ...I really should take a better look at that "new features"
page on the wiki.
--
Jaime
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 4-10-2012 8:16, Jaime Vives Piqueres wrote:
> On 04/10/12 04:12, Cousin Ricky wrote:
>> #for
>
> What? ...I really should take a better look at that "new features"
> page on the wiki.
He he! I also totally forgot about that feature... ;-)
[but that is not Ricky's point in his original post of course]
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 04.10.2012 04:01, schrieb Cousin Ricky:
> P.S. Macro MapGamut() has the same pass-by-reference issue that CH2RGB() used
> to have. (See "CH2RGB somehow causes infinite loop" in p.general.)
>
I see. I've corrected it for my distribution of CIE.inc within the
LS_SpectralRender.zip file.
Thanks
-Ive
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 04.10.2012 08:16, schrieb Jaime Vives Piqueres:
> On 04/10/12 04:12, Cousin Ricky wrote:
>> #for
>
> What? ...I really should take a better look at that "new features"
> page on the wiki.
>
The #for loop is there since years! And it is an important feature for
lazy people ;)
-Ive
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 4-10-2012 16:56, Ive wrote:
> I see. I've corrected it for my distribution of CIE.inc within the
> LS_SpectralRender.zip file.
Thanks, and got it.
I suppose Jaime should also update his Lightsys page. ;-)
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 06/10/12 16:07, Thomas de Groot wrote:
> On 4-10-2012 16:56, Ive wrote:
>> I see. I've corrected it for my distribution of CIE.inc within the
>> LS_SpectralRender.zip file.
>
>
> Thanks, and got it.
>
> I suppose Jaime should also update his Lightsys page. ;-)
Yes, that page and a lot more... I was supposed to update the site
this summer, but I'm a bit late. Man, I really have a severe case of "I
should be doing something else"!
OK, will do it this week, as I have a lot of unpublished images and
experiments, and it can get ugly if I let it to continue like this...
--
Jaime
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 8-10-2012 8:54, Jaime Vives Piqueres wrote:
>> I suppose Jaime should also update his Lightsys page. ;-)
>
>
> Yes, that page and a lot more... I was supposed to update the site
> this summer, but I'm a bit late. Man, I really have a severe case of "I
> should be doing something else"!
I know what you mean :-)
>
> OK, will do it this week, as I have a lot of unpublished images and
> experiments, and it can get ugly if I let it to continue like this...
Looking forward to that! And take your time. No need to do a hasty job.
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 08/10/12 09:06, Thomas de Groot wrote:
> Looking forward to that! And take your time. No need to do a hasty
> job.
My real problem is that I naively decided years ago to offer a
bilingual site... so the amount of work needed for any update is almost
twice (the files are shared between both sites, but I need to translate
the texts, and I'm not very fast at it).
--
Jaime
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |