POV-Ray : Newsgroups : povray.advanced-users : D65 spectral locus : Re: D65 spectral locus Server Time
27 Apr 2024 05:08:35 EDT (-0400)
  Re: D65 spectral locus  
From: clipka
Date: 19 Mar 2017 18:30:05
Message: <58cf066d$1@news.povray.org>
Am 19.03.2017 um 23:04 schrieb Mike Horvath:

> Did you use a function to color the shape, or did you color each
> triangle in a solid color? I am doing the latter at the moment using the
> xyz2RGB() macro that comes with Lightsys. It works okay, but you can see
> each and every triangle as a result. I don't like that.
> 
> I also tried re-using the function I used to color the sRGB gamut, and
> the result is very wonky and random looking. Not good.

I used an average of three function pattern pigments, each representing
the R, G or B component, respectively (multiplied by 3, so that the
average effectively implemented a sum), of the colour space in question
(CIE xyY in the particular case).

The functions did not go via sRGB, but straight from xyY to XYZ and from
there to linear RGB (with sRGB primaries).

As the entire shape is outside the linear RGB gamut, a straightforward
implementation of the functions would inevitably have exceeded the 0..1
range, and thus have caused undesired wraparound in the function
pattern; I therefore designed the functions to nominally return values
in the range from 0.5 to 0.6, and chose the colour map in a manner to
compensate (using e.g. `color_map{[0, red -5*3][1, red 5*3]}` for the
red component; note that the values of -5 and +5 compensate for the
uncommon nominal function range, while the factor of 3 is the one
required to effectively turn the average into a sum).


Post a reply to this message

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