Command line switches
To run Triangle, the command line syntax is
triangle [-prq__a__AcevngBPNEIOXzo_YS__iFlsCQVh] input_file
Underscores indicate that numbers may optionally follow certain switches.
Do not put a space between a switch and its numeric parameter.
input_file must be a file with extension
.node, or extension
.poly if the
-p switch is used. If
-r is used, you must supply
.node and
.ele files, and possibly a
.poly file and
.area file as well.
For some of the command line switches described below, you may click
on the switch for detailed information.
- -p
Triangulates a
Planar Straight Line Graph
(.poly file).
- -r
Refines a previously generated mesh.
- -q
Quality mesh generation with no angles smaller than 20 degrees.
An alternate minimum angle may be specified after the `q'.
- -a
Applies a maximum triangle area constraint.
A fixed area constraint (that applies to every triangle) may be specified
after the `a', or varying area constraints may be read from a file.
- -A
Assigns a regional attribute to each triangle.
- -c
Encloses the convex hull with segments.
- -e
Outputs (to an .edge file)
a list of edges in the triangulation.
- -v
Outputs the Voronoï diagram
associated with the triangulation. Does not attempt to detect degeneracies.
- -n
Outputs (to an .neigh file)
a list of triangles neighboring each triangle.
- -g
Outputs the mesh to an Object File Format (.off) file, suitable for
viewing with
the Geometry Center's
Geomview package.
- -B
Suppresses boundary markers in the output
.node,
.poly, and
.edge output files.
- -P
Suppresses the output .poly file.
Saves disk space, but you lose the ability
to impose segment
constraints on later refinements of the mesh.
- -N
Suppresses the output .node file.
- -E
Suppresses the output .ele file.
- -I
Suppresses mesh iteration numbers.
- -O
Suppresses all holes. Ignores the holes in the
.poly file.
- -X Suppresses exact arithmetic.
- -z Numbers all items starting from zero (rather than one).
Note that this switch is normally overrided by the value used to number the
first point of the input .node or .poly file. However, this switch
is useful when calling Triangle from another program.
- -o2
Generates second-order subparametric
elements with six nodes each.
- -Y
Prohibits the insertion of
Steiner points on the boundary.
- -S
Specifies the maximum number of added
Steiner points.
- -i
Uses the incremental method for Delaunay triangulation,
rather than the divide-and-conquer method.
- -F
Uses Steven Fortune's sweepline method for Delaunay triangulation,
rather than the divide-and-conquer method.
- -l
Uses only vertical cuts in the divide-and-conquer algorithm. By
default, Triangle uses alternating vertical and horizontal cuts,
which usually improve the speed except with point sets that are
small or short and wide. This switch is primarily of theoretical
interest.
- -s
Specifies that segments should be forced into the triangulation by
recursively splitting them at their midpoints, rather than by
generating a constrained Delaunay triangulation. Segment splitting
is true to Ruppert's original algorithm, but can create needlessly
small triangles near external small features.
- -C
Check the consistency of the final mesh. Uses exact arithmetic for
checking, even if the -X switch is used. Useful if you suspect
Triangle is buggy.
- -Q
Quiet: Suppresses all explanation of what Triangle is doing, unless
an error occurs.
- -V
Verbose: Gives detailed information about what Triangle is doing.
- -h
Help: Displays complete instructions.
Return to Triangle home page.
jrs@cs.cmu.edu