Re: FrontDrawer

Hi Ivy,

> I would like to ask, using VisAD, is there any method, to draw
> symbols like TC, High, or Low, on the image? Like those shown on
> the weather map, Thanks. I've tried to use Display.Shape, but I
> fail to do so.

Shape will work for this, and you can find examples in the
Test46.java and Test47.java programs in visad/examples.

See visad/meteorology/WeatherSymbols.java, which may do just
what you need using Shape. See its main() method for an
example of how to use it.

Another approach is to use Text, if your symbols are all text
strings like "TC", "High" and "Low". See Test69.java for an
example of using Text with fonts.

Run 'java DisplayTest' in the visad/exampls directory to see a
list of all Test programs.

> I would also like to know who to use VisAD to draw cold front, etc?
> I find that the API have FrontDrawer, but I don't know how to use it.
> Are there any sample codes on that? Thank you.

The main() method in FrontDrawer.java gives an example. Note
that FrontDrawer is designed to enable users to interactively
draw fronts of various types. Actually, time sequences of fronts.
However, you can give the constructor:

  public FrontDrawer(FieldImpl fs, float[][][] cs,
                     DisplayImplJ3D d, int fw, int front_kind)

the curves for a front sequence in the cs array, dimensioned:

  cs[number_of_time_steps][2][number_of_points_per_time_step]

where the number_of_points_per_time_step can vary between time
steps. I think you can pass fs as null (it is only provided as
an argument in case the applications needs to have a reference
to the FieldImpl containing the fronts).

Good luck,
Bill