Creating and Editing Delaunay Triangulations
The Delaunay triangulation is t he most widely use d triangulation i n s cientific com puti ng. T he properties associated with the
triangulation provi de a basis f or s olving a variety of geometric problems. T he following exam ples demonstrate how to create, e dit, and query Delaunay triangulations usi ng t he DelaunayTri class. Construction of constraine d Delaunay triangulations is also dem onstrated, together with an applications covering me dial axis computation and mesh morphing.
Contents
∙Example One: Create and Plot a 2D Delaunay Triangulation
∙Example Two: Create and Plot a 3D Delaunay Triangulation
∙Example Three: A ccess t he Triangulation Data Str uct ure
∙Example Four: Edit a Delaunay Triangulation t o Insert or Rem ove Points
∙Example Five: Create a Constraine d Delaunay Triangulation
∙Example Six: Create a Constrained Delaunay Triangulation of a Geographical Map
∙Example Seve n: Curve Re construction from a Point Cloud
∙Example Eight: Com pute an Approximate Me dial Axis of a Polygonal Domain
∙Example Nine: Morph a 2D Mesh to a Modified Boundary
Example One: Create and Plot a 2D Delaunay Triangulation
This example s hows you how to compute a 2D Delaunay triangulation and how t o plot the triangulation together with t he vertex and triangle labels.
dt =
DelaunayTri
Properties:
Constraints: []
X: [10x2 double]
Triangulation: [11x3 double]
Example Two: Create and Plot a 3D Delaunay Triangulation This example s hows you how to compute a 3D Delaunay triangulation and how t o plot the triangulation.
X =
0.6557 0.7060 0.4387
0.0357 0.0318 0.3816
0.8491 0.2769 0.7655 0.9340 0.0462 0.7952 0.6787 0.0971 0.1869 0.7577 0.8235 0.4898 0.7431 0.6948 0.4456 0.3922 0.3171 0.6463 0.6555 0.9502 0.7094 0.1712 0.0344 0.7547
dt =
DelaunayTri
Properties:
Constraints: []
X: [10x3 double] Triangulation: [22x4 double]
Example Three: Access the Triangulation Data Structure
There are tw o w ays t o access t he triangulation data structure. O ne way is via the Triangulation pr operty, t he other way is usi ng indexi ng.
Create a 2D Delaunay triangulation from 10 random poi nts.
X =
0.2760 0.7513
0.6797 0.2551
0.6551 0.5060
0.1626 0.6991
0.1190 0.8909
0.4984 0.9593fontweight默认值
0.9597 0.5472
0.3404 0.1386
0.5853 0.1493
0.2238 0.2575
dt =
DelaunayTri
Properties:
Constraints: []
X: [10x2 double] Triangulation: [12x3 double]
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论