incenter

Incenters and inscribed-circle radii of the triangles or tetrahedra of a triangulation.

Category: Mathematics > Computational Geometry

Syntax

IC = incenter(TR)

Incenter of every simplex, one row each.

IC = incenter(TR, T)

Only for the simplices in T.

[IC, r] = incenter(___)

Also returns the inradii.

Description

The incenter is the center of the largest circle (sphere) that fits inside a simplex, touching all its sides. For a triangle it is where the angle bisectors meet. Unlike the circumcenter, it always lies inside the simplex.

The ratio of inradius to circumradius is a common measure of how well-shaped a triangle is.

Input arguments

TR
A triangulation or delaunayTriangulation object.
T
Optional column vector of simplex indices.

Output arguments

IC
Incenter coordinates, one row per simplex.
r
Column vector of the radii of the inscribed circles (spheres).

Example

Incenters and radii

x = [0 1 1 0 0.5]';
y = [0 0 1 1 0.5]';
DT = delaunayTriangulation(x, y);
[IC, r] = incenter(DT)
Output
IC = 4×2

    0.7929    0.5000
    0.5000    0.2071
    0.2071    0.5000
    0.5000    0.7929
r = 4×1

    0.2071
    0.2071
    0.2071
    0.2071

See also

circumcenter incenters delaunayTriangulation triangulation