Class: TriRep
(Not recommended) Circumcenters of specified simplices
Note
circumcenters(TriRep)
is not recommended. Use circumcenter(triangulation)
instead.
TriRep
is not recommended. Use triangulation
instead.
CC = circumcenters(TR, SI)
[CC RCC] = circumcenters(TR, SI)
CC = circumcenters(TR, SI)
returns the coordinates of the circumcenter
of each specified simplex SI
. CC
is an
m
-by-n
matrix, where m
is of length
length(SI)
, the number of specified simplices, and n
is
the dimension of the space where the triangulation resides.
[CC RCC] = circumcenters(TR, SI)
returns the circumcenters and the
corresponding radii of the circumscribed circles or spheres.
TR | Triangulation object. |
SI | Column vector of simplex indices that index into the triangulation matrix
TR.Triangulation . If SI is not specified the
circumcenter information for the entire triangulation is returned, where the circumcenter
associated with simplex i is the i 'th row of
CC . |
CC | m -by-n matrix. m is the number
of specified simplices and n is the dimension of the space where the
triangulation resides. Each row CC(i,:) represents the coordinates of the
circumcenter of simplex SI(i) . |
RCC | Vector of length length(SI) , the number of specified simplices
containing radii of the circumscribed circles or spheres. |
Load a 2-D triangulation.
load trimesh2d trep = TriRep(tri, x,y)
Compute the circumcenters.
cc = circumcenters(trep); triplot(trep); axis([-50 350 -50 350]); axis equal; hold on; plot(cc(:,1),cc(:,2),'*r'); hold off;
The circumcenters represent points on the medial axis of the polygon.
Query a 3-D triangulation created with DelaunayTri
. Compute the
circumcenters of the first five tetrahedra.
X = rand(10,3); dt = DelaunayTri(X); cc = circumcenters(dt, [1:5]')