filled triangles

Bill Hibbard hiding at japan.com
Thu Mar 8 15:29:20 MST 2007


 Hi Ricardo,

  I am using VisAD to display a bunch of filled triangles (as shown
  in attachment). Since each triangle is supposed to be a different
  color my approach was to create an irregular2DSet for each one
  (using Delaunay.fill()) and then create a reference for each one
  with an associated constant map (describing Red, Green, Blue).

  However, this is awfully slow when I have hundreds of triangles. I
  was looking for something like creating an unionSet with the
  irregular2DSets with each irregular2DSet having a property
  associated to the color but I couldn't find a way to to it.


Construct a FlatField with MathType ((x, y) -> (r, g, b)) and use the
UnionSet as the domain Set of the FlatField. Then you have ScalarMaps
of the Field range values to Red, Green and Blue, and fill the triangle
vertex colors into those range values.

Good luck,
Bill
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
Url: http://mailman.unidata.ucar.edu/mailing_lists/archives/visad/attachments/20070308/ca211eae/attachment.ksh 


More information about the visad mailing list