showme


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 A
      
Now, 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.

Languages:

showme is available in a C version.

Related Data and Programs:

POLY, a file directory which contains a description and examples of the POLY file format.

showme_test

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.

Author:

Jonathan Shewchuk,
Computer Science Division,
University of California at Berkeley,
Berkeley, California, 94720-1776

Reference:

  1. Franz Aurenhammer,
    Voronoi diagrams - a study of a fundamental geometric data structure,
    ACM Computing Surveys,
    Volume 23, pages 345-405, September 1991.
  2. Jim Ruppert,
    A Delaunay Refinement Algorithm for Quality 2-Dimensional Mesh Generation,
    Journal of Algorithms,
    Volume 18, Number 3, pages 548-585, May 1995.
  3. Jonathan Shewchuk,
    Triangle: Engineering a 2D Quality Mesh Generator and Delaunay Triangulator,
    in Applied Computational Geometry: Towards Geometric Engineering,
    edited by Ming Lin, Dinesh Manocha,
    Lecture Notes in Computer Science, Volume 1148,
    Springer, 1996,
    ISBN: 354061785X,
    LC: QA448.D38.A635.
  4. Jonathan Shewchuk,
    Delaunay Refinement Algorithms for Triangular Mesh Generation,
    Computational Geometry, Theory and Applications,
    Volume 23, pages 21-74, May 2002.
  5. https://www-2.cs.cmu.edu/~quake/triangle.html the TRIANGLE web site.

Source Code:


Last revised on 05 August 2019.