(Not recommended) Incenters of specified simplices
IC = incenters(TR,SI)
[IC RIC] = incenters(TR, SI)
IC = incenters(TR,SI) returns the coordinates
of the incenter of each specified simplex
[IC RIC] = incenters(TR, SI) returns the
incenters and the corresponding radius of the inscribed circle/sphere.
|Column vector of simplex indices that index into the triangulation
|Vector of length |
Load a 3-D triangulation:
TriRep to compute the incenters of the
first five tetrahedra.
trep = TriRep(tet, X) ic = incenters(trep, [1:5]')
Query a 2-D triangulation created with
x = [0 1 1 0 0.5]'; y = [0 0 1 1 0.5]'; dt = DelaunayTri(x,y);
Compute incenters of the triangles:
ic = incenters(dt);
Plot the triangles and incenters:
triplot(dt); axis equal; axis([-0.2 1.2 -0.2 1.2]); hold on; plot(ic(:,1),ic(:,2),'*r'); hold off;
A simplex is a triangle/tetrahedron or higher-dimensional equivalent.