[JAVA3D-INTEREST] color interpolation with legend
Could anyone guide me, a novice, with the following problem:
I need to write an application that will color different triangles based on a value, like temperature. So, if I have 10 objects with values of 1-10, I want to code to color them from red to blue, deciding the color based on the scale. The user might want to select the scale. I'll also need a legend drawn. My questions are how to pick these colors, how to use a data point and interpolate which color it belongs with, etc. I'm sure weather maps and such do this regularly. From what I see of Java, you have to tell it specific colors. The only cycling I've unearthed is based on time (ColorInterpolator). Is there a cycling method (or loop) that people use to choose colors like this?
Thank you - I hope this is clear enough