ComputationalGeometry
VoronoiDiagram
compute Voronoi diagram of a set of points in 2-D
Calling Sequence
Parameters
Description
Examples
Compatibility
VoronoiDiagram(points)
VoronoiDiagram(points,options,plotopts)
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
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.
with⁡ComputationalGeometry:
xy≔1,0,3,0,5,0,7,0,9,0,2,1,4,1,6,1,8,1,1,2,3,2,5,2,7,2,9,2
VoronoiDiagram⁡xy
VoronoiDiagram⁡xy,colorregions=false,showpoints=true
m≔LinearAlgebra:-RandomMatrix⁡40,2
plots:-setcolors⁡Dalton:
VoronoiDiagram⁡m,showpoints,symbol=solidcircle,symbolsize=7
The ComputationalGeometry[VoronoiDiagram] command was introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
See Also
plots,setcolors
Download Help Document