Accelerating the pace of engineering and science

# Documentation Center

• Trial Software
• Product Updates

# circumcenters

Class: TriRep

(Will be removed) Circumcenters of specified simplices

 Note:   circumcenters(TriRep) will be removed in a future release. Use circumcenter(triangulation) instead.TriRep will be removed in a future release. Use triangulation instead.

## Syntax

CC = circumcenters(TR, SI)
[CC RCC] = circumcenters(TR, SI)

## Description

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.

## Input Arguments

 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.

## Output Arguments

 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.

## Definitions

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

## Examples

### Example 1

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.

### Example 2

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]')
```

## See Also

Was this topic helpful?