# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# voronoiDiagram

Class: DelaunayTri

(Not recommended) Voronoi diagram

### Note

`voronoiDiagram(DelaunayTri)` is not recommended. Use `voronoiDiagram(delaunayTriangulation)` instead.

`DelaunayTri` is not recommended. Use `delaunayTriangulation` instead.

## Syntax

```[V, R] = voronoiDiagram(DT) ```

## Description

`[V, R] = voronoiDiagram(DT)` returns the vertices `V` and regions `R` of the Voronoi diagram of the points `DT.X`. The region `R{i}` is a cell array of indices into `V` that represents the Voronoi vertices bounding the region. The Voronoi region associated with the `i`'th point, `DT.X(i)` is `R{i}`. For 2-D, vertices in `R{i}` are listed in adjacent order, i.e. connecting them will generate a closed polygon (Voronoi diagram). For 3-D the vertices in `R{i}` are listed in ascending order.

The Voronoi regions associated with points that lie on the convex hull of `DT.X` are unbounded. Bounding edges of these regions radiate to infinity. The vertex at infinity is represented by the first vertex in `V`.

## Input Arguments

 `DT` Delaunay triangulation.

## Output Arguments

 `V` `numv`-by-`ndim` matrix representing the coordinates of the Voronoi vertices, where `numv` is the number of vertices and `ndim` is the dimension of the space where the points reside. `R` Vector cell array of `length(DR.X)`, representing the Voronoi cell associated with each point.

## Examples

Compute the Voronoi Diagram of a set of points:

```X = [ 0.5 0 0 0.5 -0.5 -0.5 -0.2 -0.1 -0.1 0.1 0.1 -0.1 0.1 0.1 ] dt = DelaunayTri(X) [V,R] = voronoiDiagram(dt) ```

expand all