Qurak

Create a Voronoi diagram

Example 3 steps, run in order in one session. Every step was executed against the engine and the output below is what it produced.

Step 1
nf = Nearest[Table[{t Sin[t], t Cos[t]} -> t, {t, 5}]]
Output
Nearest[{{Sin[1], Cos[1]} -> 1, {2*Sin[2], 2*Cos[2]} -> 2, {3*Sin[3], 3*Cos[3]} -> 3, {4*Sin[4], 4*Cos[4]} -> 4, {5*Sin[5], 5*Cos[5]} -> 5}]
Step 2
DensityPlot[First[nf[{x, y}]], {x, -5, 5}, {y, -5, 5}]
Output
-Graphics-
Step 3
DensityPlot[First[nf[{x, y}]], {x, -5, 5}, {y, -5, 5}, PlotPoints -> 100]
Output
-Graphics-

Functions used

Related recipes

All recipes · Function reference · Use this from an MCP client