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.
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.
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.
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.
Two utility macros are also provided along with the triangle library. These perform simpler tasks that are not done directly by the triangle library.
Triangle_Stats
Takes an input triangle mesh and calculates the area of each triangle. The calculated areas are placed into a cell data component. The macro outputs a new field structure and a renderable DataObject.
struct_to_fld
Converts a struct_triangulateio group into a field structure. The struct_triangulateio group is used by the low-level triangle module for both input and output. This macro takes that group and converts it into a triangle mesh and node data component that can be used by other Express module.
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
TriConcavePolygonExample
Triangulates the specified Concave polygon.TriConvexHullExample
Determines the Convex Hull that surrounds the specified polygon.TriDelauneyTriangulationExample
Performs a Delauney triangulation of the specified polygon.TriPointInPolygonExample
Performs a Delauney triangulation of the specified polygon. If a point is picked using aCTRL
-click the triangle containing the picked point is determined and displayed.TriVoronoiExample
Performs a Voronoi triangulation of the specified points.ContinuousSketch Examples
TriFaultExample
Determines which cells are crossed by the specified fault line and triangulates the combined fault line and cell mesh.TriMovingRegionExample
Determines which cells are crossed by the specified fault region and triangulates the combined fault region and cell mesh.TriAnimatedRegionExample
Determines which cells are crossed by the specified fault region and triangulates the combined fault region and cell mesh. The loop module can be used to rotate the fault region. The output mesh is retriangulated after each move.
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.
The low-level TriangleMods library containing the low-level modules does not specify a process. By default the express process will be used.
Dr. David Knight, Advanced Visual Systems, Inc.
Ma YingLiang, Manchester Visualization Centre Andrew Dodd, International AVS Centre
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL