|
|
Le 17-07-21 à 18:28, jr a écrit :
> hi,
>
> can someone please point me to a color_map example which provides a
> smooth blend/gradient from (ideally) blue at 0 to red at 1 in 254
> increments? I'd prefer a solution which does not require (an array of)
> named colours.
>
> thank you, jr.
>
You don't need to chop your gradient into many pieces:
//The nice and simple way
pigment{gradient x colour_map{[0 rgb<0,0,1>][1 rgb<1,0,0>]}}}
If you want the long and painfull way...:
//The long and ugly way
#declare Steps=1024;
pigment{gradient x colour_map{
#for(I, 0,1,1/Steps)
[I rgb<I,0,1-I>]
//As of version 3.7, maps are no longer limited to 256 entries
#end
}}}
Both should give exactly the same result when using assumed_gamma 1.
Post a reply to this message
|
|