# incenters

Class: TriRep

(Will be removed) Incenters of specified simplices

 Note:   `incenters(TriRep)` will be removed in a future release. Use `incenter(triangulation)` instead.`TriRep` will be removed in a future release. Use `triangulation` instead.

## Syntax

`IC = incenters(TR,SI)[IC RIC] = incenters(TR, SI)`

## Description

`IC = incenters(TR,SI)` returns the coordinates of the incenter of each specified simplex `SI`.

`[IC RIC] = incenters(TR, SI)` returns the incenters and the corresponding radius of the inscribed circle/sphere.

## Input Arguments

 `TR` Triangulation representation. `SI` Column vector of simplex indices that index into the triangulation matrix `TR.Triangulation`. If `SI` is not specified the incenter information for the entire triangulation is returned, where the incenter associated with simplex `i` is the `i`'th row of `IC`.

## Output Arguments

 `IC` `m`-by-`n` matrix, where ```m = length(SI)```, the number of specified simplices, and `n` is the dimension of the space where the triangulation resides. Each row `IC(i,:)` represents the coordinates of the incenter of simplex `SI(i)`. `RIC` Vector of length `length(SI)`, the number of specified simplices.

## Definitions

A simplex is a triangle/tetrahedron or higher-dimensional equivalent.

## Examples

### Example 1

` load tetmesh`

Use `TriRep` to compute the incenters of the first five tetrahedra.

``` trep = TriRep(tet, X) ic = incenters(trep, [1:5]')```

### Example 2

Query a 2-D triangulation created with `DelaunayTri`.

```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;```