Voronoi diagram: Difference between revisions
Content added Content deleted
m (→{{header|Lua}}) |
m (→{{header|Lua}}) |
||
Line 827: | Line 827: | ||
function generateVoronoi(width, height, num_cells) |
function generateVoronoi(width, height, num_cells) |
||
canvas = love.graphics.newCanvas(width, height) |
canvas = love.graphics.newCanvas(width, height) |
||
imgx = canvas:getWidth() |
local imgx = canvas:getWidth() |
||
imgy = canvas:getHeight() |
local imgy = canvas:getHeight() |
||
local nx = {} |
local nx = {} |
||
local ny = {} |
local ny = {} |