Le 11/03/2012 18:52, Alain a écrit :
> Don't use a color_map, but a spline.
> Have controll points for various temperatures and access it with the
> desired temperatures you want to represent.
> Use the returned value as a plain pigment.
>
>
> If you use many temperature samples, a linear spline may be enough, but
> a cubic_spline will give you a smooth regular curve.
IIRC:
If you are using a linear spline, I guess there is no gain from using a
color_map. linear Interpolation is performed on color_map when the value
is not found in the map.
Using a non-linear spline might be trickier: some points are used only
as control and will not ever appear. And such points vary with the kind
of spline. (cubic_spline eats the first and last points, for instance,
something that should be considered when doing mapping)
Also, the 3 other splines available (*) in povray are subject to provide
values outside the control points range. (it might surprise you to get a
blue component of 1.2 when all your blue controls were in the 0 to 1 range!)
*: cubic_spline, natural_spline and quadratic_spline.
Post a reply to this message
Attachments:
Download 'leforgeronspline11.png' (9 KB)
Download 'leforgeronspline03.png' (8 KB)
Download 'leforgeronspline09.png' (7 KB)
Download 'leforgeronspline10.png' (8 KB)
Preview of image 'leforgeronspline11.png'
![leforgeronspline11.png](/povray.general/attachment/%3C4f5e1261%40news.povray.org%3E/leforgeronspline11.png?preview=1)
Preview of image 'leforgeronspline03.png'
![leforgeronspline03.png](/povray.general/attachment/%3C4f5e1261%40news.povray.org%3E/leforgeronspline03.png?preview=1)
Preview of image 'leforgeronspline09.png'
![leforgeronspline09.png](/povray.general/attachment/%3C4f5e1261%40news.povray.org%3E/leforgeronspline09.png?preview=1)
Preview of image 'leforgeronspline10.png'
![leforgeronspline10.png](/povray.general/attachment/%3C4f5e1261%40news.povray.org%3E/leforgeronspline10.png?preview=1)
|