Anonymous user
Voronoi diagram: Difference between revisions
→{{header|Ruby}}
(add Ruby) |
|||
Line 586:
def distance_to(px, py)
Math::
end
end
Line 597:
ColourPixel.new(
3+rand(width-6), 3+rand(height-6), # provide a margin to draw a circle
RGBColour.new(rand(
)
end
|