Re: Displaying Delaunay Triangulation

Neil,

Take a look at Delaunay.java's main method for an example of displaying
a Delaunay triangulation as a collection of edges.  Most notably, look
at lines 1013 to 1125, which plot a 3-D tetrahedralization to a VisAD
DisplayImplJ3D display.  You should be able to adapt this code to 2-D
fairly easily; the idea is to use a UnionSet of Gridded2DSets (line
segments) computed from the triangulation's edges.

Good luck,
Curtis

At 17:12 9/15/00, you wrote:
>I would like to display the Delaunay triangulation of a 2-D set of
>points.  The only example program I could find dealing with this is
>Region.java, in which a set of points is triangulated, then used to form
>an Irregular2DSet, which is then displayed.  However, this shows up as a
>solid region bounded by the outer boundary of the triangulation, whereas
>I would like to see each edge of the triangulation.
>
>I succeeded in displaying a triangulation by extracting each triangle
>from Delaunay, then building a FlatField for each triangle by setting
>the y-values of the triangle versus an Irregular1DSet of the x-values.
>A data reference is constructed and added to the display for each of
>these triangle FlatFields.  Before adding any data references to the
>display, x and y ScalarMaps are added to the display and the ranges set
>so that all triangles are plotted on the same scale.
>
>This works, but it doesn't seem to be a very good way to do it, and it
>takes several minutes just to display about 1000 triangles.  What would
>be a better way to display a triangulation?
>
>Thanks,
>Neil Bomberger


  • 2000 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: