Gypaets/polygonAdjacencyMatrix
% Definition
polygonAdjacencyMatrix calculates the adjacency matrix of the polygons
defined with a triangulation's connectivity list cL. Fast and fully
vectorized approach.
% Usage
Input:
cL: (n x 3) connectivity list of the triangulation.
Output:
pAM: (n x n) polygon adjacency matrix.
% Example
% Create triangulation from 100000 random points
pointsC=rand(100000,2);
X=pointsC(:,1);
Y=pointsC(:,2);
tri=delaunayTriangulation(X,Y);
% Extract connectivity list
cL=tri.ConnectivityList;
% Calculate polygon adjacency matrix
tic
pAM = polygonAdjacencyMatrix(cL);
toc
Citar como
Gypaets (2024). Gypaets/polygonAdjacencyMatrix (https://github.com/Gypaets/polygonAdjacencyMatrix), GitHub. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
No se pueden descargar versiones que utilicen la rama predeterminada de GitHub
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0.0 | Repo update. |
|