Home > mpt > extras > geometry > mpt_voronoi.m

# mpt_voronoi

## PURPOSE

MPT_VORONOI Computes the voronoi diagram via mpLP

## SYNOPSIS

function [Pn]=mpt_voronoi(points,Options)

## DESCRIPTION

MPT_VORONOI Computes the voronoi diagram via mpLP

[Pn]=mpt_voronoi(points,Options)

---------------------------------------------------------------------------
DESCRIPTION
---------------------------------------------------------------------------
The voronoi diagram is a partition of the state space; For a given set of
points pj, each region Pn(j) is defined as
Pn(j)={x \in R^n | d(x,pj)<=d(x,pi), \forall i \neq j}

---------------------------------------------------------------------------
INPUT
---------------------------------------------------------------------------
points         -  Optional input:
Matrix p times nx of points: nx is state space dimension and
p is the number of points
The entry is graphical in 2D if no parameters are passed.
Options.pbound -  A "bounding polytope". If provided, the voronoi cells will
be bounded by this polytope. If not provided, the cells will
be bounded by a hypercube as big as 1.5x the maximum
coordinate of any of the seed points
Options.plot   -  If set to 1, plots the voronoi diagram (0 is default)
Options.sortcells - If set to 1, resulting Voronoi partition will be ordered
in a way such that Pn(i) corresponds to seed point i.
(Default is 1)

---------------------------------------------------------------------------
OUTPUT
---------------------------------------------------------------------------

Pn            -   Voronoi partition

see also MPT_DELAUNAY

## CROSS-REFERENCE INFORMATION

This function calls:
• length LENGTH Returns number of regions over which the explicit control law is defined
• plot PLOT Plots regions of the explicit controller
• dimension DIMENSION Returns dimension of the given polytope
• double DOUBLE Function used to access internal properties of the given polytope
• end END Returns the last element in a given polytope array
• extreme EXTREME Calculates extreme points of a given polytope
• isinside ISINSIDE Checks if a given point lies in the interior of a given polytope
• length LENGTH Returns number of elements in a polytope array
• plot PLOT Plots polytopes in 2D or 3D
• size SIZE Returns size of the given polytope object
• mpt_error MPT_ERROR Function called if MPT toolbox is not initialized
• unitbox UNITBOX Creates a unit box centered at origin
• mpt_mplp MPT_MPLP Explicitly solves the given linear program (LP)
This function is called by:

Generated on Thu 30-Mar-2006 10:26:47 by m2html © 2003