Triangulate_Area

Synopsis

The Triangulate_Area macro takes a fault line and a series of boundary segments, determines which segments the fault line crosses and triangulates the fault line with the crossed segments. This macro is part of a suite of modules for advanced Triangle generation and manipulation.

Input Ports

Name Type Description

in_fld Mesh Input data that represents the boundary segments.
in_fault Mesh Input polyline that represents the fault line.

Output Ports

Name Type Description

out_mesh Triangle Mesh Output triangulated fault mesh.
out_fld Field Original boundary segments with added cell data.
out_obj DataObject Directly renderable output object.

Description

The Triangulate_Area macro takes a fault line and a series of boundary segments, determines which segments the fault line crosses and triangulates the fault line with the crossed segments. Triangulate_Area is a higher-level macro that internally uses 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 macro presented here combines the triangle and fault_region low-level modules to produce a macro that is able to determine which boundary segments a fault line crosses and then triangulate the fault line with the crossed boundary segments. This produces a triangle grid that can be used for further calculations and visualizations. It could, for instance, be used as an interpolation probe. The macro also generates a set of cell data and combines it with the input boundary segment data. The generated cell_data contains Null data for each segment that the fault line did cross. This allows the generated triangle mesh to be more easily seen. More information on the tasks that are being performed by this macro can be found on the triangle library home-page. An example of how to use the macro can be found in the TriFaultExample application.

Inputs

in_fld

The input field that represents the boundary segments. The field should contain a polygon mesh.

in_fault

The input field that represents the fault line. The field should contain a polyline mesh. The polyline mesh should only contain a single fault line. If any more are present the macro will not work correctly.

Outputs

out_mesh

The output triangulated field generated from the crossed boundary segments combined with the fault line. The output field contains a triangle mesh.

out_fld

The output boundary segment field generated by combining the new cell data with the original boundary segments field. The new cell data contains a 0 for each segment that was not crossed and a 1 for each segment that was crossed. The cell data is setup so that a 1 is treated as Null data. It does not contain any other data.

out_obj

The directly renderable output of the triangulate_area macro. This output contains both the triangulated mesh and the boundary segment field containing the new cell data. This output can be displayed in a 2D viewer. The modes and properties of each output object are set so that the various output objects 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