Gypaets/polygonAdja​cencyMatrix

Version 1.0.0.0 (1.94 KB) by Gypaets
Polygon adjacency matrix calculation for triangulations using MATLAB.
52 Downloads
Updated 29 Jun 2017

% 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

Cite As

Gypaets (2024). Gypaets/polygonAdjacencyMatrix (https://github.com/Gypaets/polygonAdjacencyMatrix), GitHub. Retrieved .

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

Community Treasure Hunt

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

Start Hunting!

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes
1.0.0.0

Repo update.

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.