VoronoiDiagram - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

ComputationalGeometry

 VoronoiDiagram
 compute Voronoi diagram of a set of points in 2-D

 Calling Sequence VoronoiDiagram(points) VoronoiDiagram(points,options,plotopts)

Parameters

 points - a list of two element lists or an n by 2 Matrix representing n coordinates options - (optional) keyword options of the form option=value where option can be showpoints or colorregions or duplicates plotopts - (optional) standard keyword plot options, as explained on the plot,options help page

Description

 • The VoronoiDiagram command computes and plots the Voronoi diagram of a set of input points.
 • If points is a Matrix, then each row of points is treated as a point. If it is a list of lists, then each sublist is a point.
 • All entries of points must evaluate to floating-point values when evalf is applied. This happens as a preprocessing step.
 • If the showpoints option is set to true, the input points are also plotted. By default, showpoints is set to false.
 • If the colorregions option is set to false, the Voronoi regions are represented by their outlines. Otherwise, they are represented by filled polygons such that no two adjacent Voronoi regions have the same color; the colors used depend on the value of the option:
 – If colorregions is a list of color specifications as understood by plot commands, then those are used.
 – If colorregions is a Palette object from the ColorTools package, then the colors from that palette are used.
 – If colorregions is true, then the result of plots[setcolors] is used.

By default, colorregions is set to true.

 • If the duplicates option is set to true, then points is tested for duplicate points, and if such duplicate points are found, they are removed. If the duplicates option is set to  false, this is not done, and you may get unexpected results if there are duplicate points in the input. The default value for duplicates is true.

Examples

 > $\mathrm{with}\left(\mathrm{ComputationalGeometry}\right):$
 > $\mathrm{xy}≔\left[\left[1,0\right],\left[3,0\right],\left[5,0\right],\left[7,0\right],\left[9,0\right],\left[2,1\right],\left[4,1\right],\left[6,1\right],\left[8,1\right],\left[1,2\right],\left[3,2\right],\left[5,2\right],\left[7,2\right],\left[9,2\right]\right]$
 ${\mathrm{xy}}{≔}\left[\left[{1}{,}{0}\right]{,}\left[{3}{,}{0}\right]{,}\left[{5}{,}{0}\right]{,}\left[{7}{,}{0}\right]{,}\left[{9}{,}{0}\right]{,}\left[{2}{,}{1}\right]{,}\left[{4}{,}{1}\right]{,}\left[{6}{,}{1}\right]{,}\left[{8}{,}{1}\right]{,}\left[{1}{,}{2}\right]{,}\left[{3}{,}{2}\right]{,}\left[{5}{,}{2}\right]{,}\left[{7}{,}{2}\right]{,}\left[{9}{,}{2}\right]\right]$ (1)
 > $\mathrm{VoronoiDiagram}\left(\mathrm{xy}\right)$
 > $\mathrm{VoronoiDiagram}\left(\mathrm{xy},'\mathrm{colorregions}'=\mathrm{false},'\mathrm{showpoints}'=\mathrm{true}\right)$
 > $m≔\mathrm{LinearAlgebra}:-\mathrm{RandomMatrix}\left(40,2\right)$
 > $\mathrm{plots}:-\mathrm{setcolors}\left("Dalton"\right):$
 > $\mathrm{VoronoiDiagram}\left(m,\mathrm{showpoints},\mathrm{symbol}=\mathrm{solidcircle},\mathrm{symbolsize}=7\right)$

Compatibility

 • The ComputationalGeometry[VoronoiDiagram] command was introduced in Maple 2018.
 • For more information on Maple 2018 changes, see Updates in Maple 2018.