delaunayTriangulation2D

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - VLFL/Surfaces
Introduced first in SolidGeometry 4.9, Creation date: 2020-01-26, Last change: 2025-09-14

returns a 2D delaunay triangulation for planar surfaces in 3D

Description

Not speed optimzed at the moment.
A Delaunay Triangulation in 2D consists of a point cloud, an area decomposition into triangles and a list of constraints, i.e. an edge list containing forced exceptions to the optimal Delaunay Triangulation.
The Matlab delaunayTriangulation function generates either a rejection or a convex hull for planar surfaces in 3D, without this being detectable in advance.
My function creates a planar Delaunay triangulation in 3D and returns the constraint list separately as an Edge List.
It is based on a rotation of all points into a plane based on the first 4 points of the vertex list, the delaunay triangulation in 2D wrt to the Constraint-Edge List, and the transformation of a new crossing points into 3D as the original points and rounding to 12 significant digits.

See Also:

Example Illustration

 missing image of delaunayTriangulation2D(VL,CL)

Syntax

[TR3,CL,NVL,chng,FL,isInter]=delaunayTriangulation2D(VL,[CL])

Input Parameter

VL: Vertex list, Point list in 3D
CL: Edge List, Constraints

Output Parameter

TR3: triangulation
CL: Edge List, constraints
NVL: true if points list is extended or consolidated (doubled vertex removal)
chng: Full Triangulation
FL: inInteriorflag
isInter:

Examples


n=1 % Test number
[A,B]=VLsampletriangles(n); VL=[A;B]*rot(1,2,3); SGfigure; VLELplots(VL,[1 2;2 3; 3 1; 4 5;5 6;6 4]);
delaunayTriangulation2D([A;B],[1 2;2 3;3 1])
delaunayTriangulation2D(VL,[1 2;2 3;3 1;4 5;5 6;6 4])
delaunayTriangulation2D(VL,[1 2;2 3; 3 1; 4 5;5 6;6 4])
delaunayTriangulation2D(VLsampletriangles(11),[1 2;2 3;3 1; 4 6; 6 5; 5 4]), view(0,0)
delaunayTriangulation2D(VLsampletriangles(11),[1 2;2 3;3 1; 6 4; 5 6; 4 5]), view(0,0)
delaunayTriangulation2D([0 0 0;0 1 0;3 0 0; 1 0 0; 2 0 0],[1 2;2 3;3 1; 4 5;5 4])




Copyright 2020-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Last html export of this page out of FM database by TL: 2025-09-21