Delaunay Triangulation with 2nd, 3rd, 4th and 5th Neighbor

Version 1.1.1.0 (17 KB) by Andrej
Sort delaunay triangulation in (N x 2) matrix, derive 2nd, 3rd, 4th and 5th neighbors
116 Downloads
Updated 19 Sep 2017

View License

This function can help you sort the Delaunay Triangulation in Nx2 connectivity matrix in ascending order. It will find the 2nd, 3rd, 4th and 5th neighbors of the points. It is defined as:
[DelaunayT] = delaunaytrianglecalc(X,Y) - where 'X' and 'Y' are the defined inputs and represent the point coordinates.
The output 'DelaunayT' is a structure that will give you the following:
[Points
Delaunay Triangles (N x 3 matrix)
Delaunay Connectivity (N x 2 matrix)
2nd Neighbor Connectivity (N x 2 matrix)
3rd Neighbor Connectivity (N x 2 matrix)
4th Neighbor Connectivity (N x 2 matrix)
5th Neighbor Connectivity (N x 2 matrix)]
Example (for up to 3rd neighbor):
X = [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9]';
Y = [0.1 0.4 0.3 0.6 0.1 0.9 0.4 0.2 0.8]';
[DelaunayT] = delaunaytrianglecalc(X,Y);
Answer:

DelaunayT =

Points: [9x2 double]
DelaunayTriangles: [10x3 delaunayTriangulation]
DelaunayConnect: [18x2 double]
Neighbour2nd: [16x2 double]
Neighbour3rd: [2x2 double]

Cite As

Andrej (2024). Delaunay Triangulation with 2nd, 3rd, 4th and 5th Neighbor (https://www.mathworks.com/matlabcentral/fileexchange/63702-delaunay-triangulation-with-2nd-3rd-4th-and-5th-neighbor), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Delaunay Triangulation in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.1.0

title update

1.1.0.0

upgraded to derive up to 5th neighbor

1.0.0.0

given example