circumcenter
Circumcenters (and circumradii) of the triangles or tetrahedra in a triangulation.
Category: Mathematics > Computational Geometry
Syntax
C = circumcenter(TR)
Circumcenter of every simplex, one row each.
C = circumcenter(TR, T)
Only for the simplices whose indices are in T.
[C, r] = circumcenter(___)
Also returns the circumradii.
Description
The circumcenter is the point equidistant from all vertices of a simplex; the common distance is the circumradius. In a Delaunay triangulation the circumcircle of each triangle contains no other point, which is the defining property of that triangulation. The circumcenters are also the vertices of the Voronoi diagram.
Input arguments
TR- A
triangulationordelaunayTriangulation: 2-D, 3-D tetrahedral or a 3-D surface of triangles. T- Optional column vector of simplex indices.
Output arguments
C- Circumcenter coordinates, one row per simplex.
r- Column vector of circumradii.
Example
Circumcenters of a square mesh
x = [0 1 1 0 0.5]';
y = [0 0 1 1 0.5]';
DT = delaunayTriangulation(x, y);
[C, r] = circumcenter(DT)
Output
C = 4×2
1.0000 0.5000
0.5000 0
0 0.5000
0.5000 1.0000
r = 4×1
0.5000
0.5000
0.5000
0.5000