|
![](/i/fill.gif) |
Just write yourself a macro which interpolates the
indices and colors according to the indices.
You might want to do this using two arrays, one filled
with the colors, the other with the index-values.
Then you just write a macro which runs off with a given
index, searches the two closest (above and below the
given one), and interpolates appropriately using the colors
given by the other array.
This only works with simple linear colormaps, poly_wave
etc would have to undergo postprocessing on the index
values in the array (or the given one) to handle the change
in colorshifts...
--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmx de
> Suppose I declare a colour_map. Is there a way to read a colour out of the
> map? In other words, is there a way I can feed in a nindex value and find
> the corresponding colour?
>
> The docs say I can fetch the colour of a point out of a texture, but what
> I'm asking for is one step simpler than that... Any ideas folks?
>
> Andrew.
>
> PS. Yes, I *know* it's possible to do the linear interpolation manually, but
> it's a pain to keep typing this stuff...
>
>
Post a reply to this message
|
![](/i/fill.gif) |