triangle
: Triangular grids¶
-
mex_triangle
(varargin)¶ Triangle A Two-Dimensional Quality Mesh Generator and Delaunay Triangulator. Version 1.3
Copyright 1996 Jonathan Richard Shewchuk (bugs/comments to jrs@cs.cmu.edu) School of Computer Science / Carnegie Mellon University 5000 Forbes Avenue / Pittsburgh, Pennsylvania 15213-3891 Created as part of the Archimedes project (tools for parallel FEM). Supported in part by NSF Grant CMS-9318163 and an NSERC 1967 Scholarship. There is no warranty whatsoever. Use at your own risk. This executable is compiled for double precision arithmetic.
Mex gateway by Jostein R. Natvig, SINTEF ICT.
-
mex_triangleGrid
(points, edges, varargin)¶ Construct 2d triangle grid in physical space.
Synopsis:
G = mex_triangleGrid(pointlist, edgelist) G = mex_triangleGrid(pointlist, edgelist, 'pn1', pv1, ...)
Parameters: - pointlist – List of vertex coordinates. Must be an m-by-2 (double) array of (X,Y) coordinate tuples–one tuple for each vertex.
- edgelist –
- List of edges defining the boundary of the domain. Must be an
- n-by-2 integer array of start- and end nodes (vertices) of individual edges.
- ’pn’/pv - List of ‘key’/value pairs defining optional parameters.
- The supported options are:
- maxArea – Maximum area (m^2) of individual triangles.
- minAngle – Minimum angle in triangles (degrees).
- Use sensible values here (0 < minAngle < 40) lest the Triangle software fail to compute a triangulation.
- verbose – Whether or not to display progress information
- while triangulating the domain. Logical. Default value: verbose = false.
Returns: G – Grid structure as detailed in grid_structure, without geometric primitives. Use function computeGeometry to compute those values.
Note
This function invokes the Triangle software package. See website
for availability and terms and conditions for use.
Example:
% Make a 10m-by-5m grid. points = [ 0 , 0 ; 5 , 0 ; 5 , 10 ; 0 , 10 ]; edges = [ 1 , 2 ; 2 , 3 ; 3 , 4 ; 4 , 1 ]; G = mex_triangleGrid(points, edges, 'maxArea', 0.3); % Plot the grid in 3D-view. f = plotGrid(G); axis equal tight; view(2)
See also