Re: color control

Hi Jay,

 After your:

  ScalarMap map = new  ScalarMap((RealType) precipitation,Display.RGB);

do:

  map.setRange(min, max); // min and max of precipitation values
  float[][] table = new float[3][table_length];
  // set color values you want in table
  ColorControl control = (ColorControl) map.getControl();
  control.setTable(table);

The 3 components of table are red, green and blue. You can
set the color values you want for various precipitation
values. You'll probably need to experiment a bit to get
the look you want.

Good luck,
Bill

On Tue, 13 Jan 2004, Jay Parsons wrote:

> VisADers,
>
> I am using VisAD to display water volume over a
> terrain and I am trying to get more control over the
> colors used to display water volume.
>
> Picture of my current state:
> http://www.swt.edu/~jp1120/waterflowvis/WATERFLOW2.JPG
>
> I am using a scalar map for water volume.
>  new  ScalarMap((RealType) precipitation,Display.RGB);
>
> But I would really like to be able to map specific
> values and ranges to specific colors.  0 to green, .01
> to 1.0 mapped to light blue, 1.01 - 5.0 to dark blue,
> etc...
>
>
> Any suggestions on how I can accomplish this type of
> color mapping?
>
> -Jay
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
>