The define of "dual" delaunay triangle from Voronoi diagram
조회 수: 3 (최근 30일)
이전 댓글 표시
p=dlmread('knot.pts'); where p is Nx3 ,matrix dt=DelaunayTri(p); [V R]=dt.voronoiDiagram(); According to Voronoi concepts ,"the delaunay triangle are dual to voronoi edge". It is possible I define the "dual triangle" of voronoi edge by based on R or V ? As i not wrong , the dt is based on dt.x and R is also based on dt.x. Second questions , [V R]=dt.voronoiDiagram() command has provide any method to define Voronoi edge? Thank you
댓글 수: 0
답변 (1개)
Ronit
2024년 9월 23일
Hi Renoald,
To define the "Dual Triangle" of a Voronoi edge, it is essential to recognize that each Voronoi edge corresponds to an edge of a Delaunay triangle. The "Dual Triangle" of a Voronoi edge can be identified by finding the Delaunay triangle whose circumcenter is represented by the Voronoi vertex to which the edge is connected.
[V, R] = dt.voronoiDiagram()
The above function gives Voronoi vertices "V" and regions "R". To get Voronoi edges, connect consecutive vertices in each region from "R". This must be done manually since the function does not directly provide edges.
% Assuming V and R are obtained from the voronoiDiagram function
voronoiEdges = [];
for i = 1:length(R)
region = R{i};
if all(region ~= 1) % Ignore infinite regions
% Connect each pair of consecutive vertices in the region
edges = [region(:), region([2:end, 1])'];
voronoiEdges = [voronoiEdges; edges];
end
end
% voronoiEdges now contains pairs of indices into V that represent edges
Please refer to the MATLAB's documentation of "voronoiDiagram" for better undeerstanding:
Hope it helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Voronoi Diagram에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!