Delauney, Voronoi, Convex_Hull, Concave_Tri

Synopsis

4 macros that perform a variety of different forms of triangulation. These macros are part of a suite of modules for advanced Triangle generation and manipulation.

Input Ports

Name Type Description

in_fld Mesh Input data that should be triangulated.

Output Ports

Name Type Description

out_mesh Mesh Output triangulated data.
out_obj TriObject Directly renderable output object.

Description

Delauney, Voronoi, Convex_Hull and Concave_Tri are all macros that perform various forms of triangulation. They are higher-level macros that internally use the triangle library to do the necessary calculations. The triangle library is a two-dimensional quality mesh generator and delaunay triangulator. It was written by Richard Shewchuk and more information about this library, its purpose and how it can be used can be found at http://www.cs.cmu.edu/~quake/triangle.html. Details of the license that this library is distributed under can be found in the LICENSE file. This suite of modules has been used in a large AVS/Express project for geologic modeling.

The 4 macros presented here provide a higher-level interface to the triangle library. The triangle module provides a direct, low-level interface to the library. However using this module directly is not recommended as the interface is complex and entering incorrect data can lead to AVS/Express crashing. These macros provide an easier to use and more reliable interface to certain parts of the triangle library. The macros perform the following tasks:

More information on the tasks that are being performed by each macro can be found on the triangle library home-page. Examples of how to use the macros can be found in the example applications library.

Inputs

in_fld

The input mesh that is to be triangulated. Except for the Concave_Tri macro, all the macro treat the input mesh as a simple series of points. The Concave_Tri macro treats the input as a polygon mesh.

Outputs

out_mesh

The output triangulated mesh generated from the input data. This mesh can be either a triangle or line mesh.

out_obj

The directly renderable output of these triangulation macros. This output contains the triangulated mesh and can be displayed in a 2D viewer. The modes and properties of each output object are set so that each type of output mesh can be identified.

Utility Macros

Two utility macros are also provided along with the triangle library. These perform simpler tasks that are not done directly by the triangle library.

Examples

The Triangle project contains 8 example applications that provide a good illustration of what the triangle library is capable of. Most of these example use either the ClickSketch or ContinuousSketch modules to create input data. Those that use the ClickSketch module start out with a blank window and expect the user to create a polyline. This is done by clicking the right mouse button in the viewer window. You should see you polyline appear in red. Once you have completed this you should click the Done button. This begins the triangulation process. Once this has finished the results are shown in the viewer window. The ContinuousSketch module is similar except that the user should hold and drag with the right mouse button to create a trail of points.

The examples supplied are as follows, beginning with the ClickSketch examples.

ClickSketch Examples

ContinuousSketch Examples

Files

iac_proj/triangle/trimacs.v contains the V definitions of the high-level macros Delauney, Voronoi, Convex_Hull, Concave_Tri, Triangulate_Area, Triangle_Stats and struct_to_fld.

Other Notes

The low-level TriangleMods library containing the low-level modules does not specify a process. By default the express process will be used.

Author

Dr. David Knight,
Advanced Visual Systems, Inc.

Modifications

Ma YingLiang,
Manchester Visualization Centre

Andrew Dodd,
International AVS Centre

Contact

International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL

See Also