showme, a C code which uses the X Window library to display triangulations and meshes, by Jonathan Shewchuk.
The code was developed for use with the TRIANGLE program (which produces Delaunay triangulations, Voronoi diagrams, and finite element meshes). Since data input is done through files with a simple format, it is easy for other programs to generate output that SHOWME can display. SHOWME can also make PostScript or Encapsulated PostScript graphics files of the images that it displays.
The code can produce documentation online. Complete instructions for invoking the program are available with the `-h' switch:
showme -h
The instructions are long; you'll probably want to pipe the output to more or redirect it to a file. If the program is invoked with no arguments, it prints a short list of command options.
SHOWME can read and display a number of computational objects. The simplest form is a Planar Straight Line Graph (PSLG), which is usually stored in a POLY file. This file contains a list of points, line segments, and possibly some information about holes.
Try out SHOWME on the sample file, A.poly:
triangle -p A.poly showme A.poly &
SHOWME will read the Planar Straight Line Graph defined by A.poly, and write its constrained Delaunay triangulation to A.1.node and A.1.ele. SHOWME will display the figure defined by A.poly. There are two buttons marked "ele" in the window; click on the top one. This will cause SHOWME to load and display the triangulation, if it has been computed by TRIANGLE.
For contrast, try running
triangle -pq ANow, click on the same "ele" button. A new triangulation will be loaded; this one having no angles smaller than 20 degrees.
To see a Voronoi diagram, try this:
cp A.poly A.node triangle -v A
Click the "ele" button again. You will see the Delaunay triangulation of the points in A.poly, without the segments. Now click the top "voro" button. You will see the Voronoi diagram corresponding to that Delaunay triangulation. Click the "Reset" button to see the whole diagram.
showme is available in a C version.
POLY, a file directory which contains a description and examples of the POLY file format.
TRIANGLE, a C code which computes Voronoi diagrams and Delaunay triangulations, and creates and manipulates files that can be displayed by showme().
TRIANGLE_FILES, a data directory which contains examples of files used by the triangle and showme programs.
Jonathan Shewchuk,
Computer Science Division,
University of California at Berkeley,
Berkeley, California, 94720-1776