> . . .
> I have been able to draw the grid using the Gridded2DSet and the
> UnionSet constructs, similiar to the Rivers example (in
> visad/examples/Rivers.java). Each set of corners is used to form a
> Gridded2DSet, and the UnionSet is used to form a disjoint set of
> these.
>
> How do I now create a function from a Gridded2DSet, to a node and then
> from a node to a node value, then to RGB ?
All current implementations of visad.Function assign values
to vertices rather than regions, so it is a little complex.
Rather than constructing a UnionSet of your Gridded2DSets,
construct each Gridded2DSet as the boundary of one node,
construct a FlatField with that Gridded2DSet as its domain
Set and range values that you can map to red, green and blue.
Then construct a FieldImpl whose range values are all the
FlatFields, and whose domain is a simple index. The MathType
of the FieldImpl would be something like:
(index -> ((x, y) -> (r, g, b)))
and each FlatField would have MathType ((x, y) -> (r, g, b)).
Let the range r, g, b values be constant for each FlatField,
to give constant color to each node.
Good luck,
Bill