Skip to Content
 

Voronoi generator

7 replies [Last post]
Yogurt
Yogurt's picture
Offline
Joined: 01/09/2009

Does anyone know of an easy, free way to generate Voronoi diagrams in Windows? They seem like a quick way to rough out a slightly random but still grid-like board.

Here is a Voronoi diagram:
http://mathworld.wolfram.com/VoronoiDiagram.html

Here's a grid generator for Linux:
http://trific.ath.cx/software/gimp-plugins/voronoi/grid-generator/

(For Linux people: I suppose I could use Knoppix to run the Linux version of the Gimp, but would I be able to add the plug-in or am I stuck with what's on the CD? I'd rather not create a dual boot system just to make a grid.)

Thanks,

Tim

Zomulgustar
Offline
Joined: 07/31/2008
Voronoi generator

I know of a few java implementations, if all you want to do is PrintScreen-Paste an appropriate image into a paint program. Knowing a bit more about precisely what you're hoping to accomplish would help me direct you to/tweak a good one for your purposes.

Yogurt
Yogurt's picture
Offline
Joined: 01/09/2009
Voronoi generator

Thanks Zomulgustar.

I'd like to use a Voronoi diagram/grid as the basis of game board. Something like the Randomness 0.9 grid on my second link above would be good, although I might start with triangles instead of hexes.

At this point, I'd be using the grid as a mockup of the board to decide if the movement rules in the game work with a slightly irregular grid (so perhaps this thread belongs in Game Design not Production).

A Java applet that I could screencap and paste into an image editor would be fine. Ideally, the applet would have a bunch of settings I could tweak to try different grids.

I don't know anything about the math behind Voronoi diagrams, by the way. I found out about them in a Google search for "triangle grid."

Tim

seo
seo's picture
Offline
Joined: 07/21/2008
Voronoi generator

Here you have an applet that might solve your basic needs:

http://www.ulg.ac.be/ltas-cao/info_etud/delaunay/delaunay.html

Couldn't find any equivalent Windows program, so if you find one let me know. This seems as an interesting method to design interesting boards.

Yogurt
Yogurt's picture
Offline
Joined: 01/09/2009
Voronoi generator

A generous Princeton student converted the Linux plugin to Windows for me. He's posted it here:
http://www.princeton.edu/~mplough/files/voronoi.zip

If you install the free GIMP image editor and put the free voronoi.exe plugin into the GIMP plugins folder, you can make all the grids and Voronoi diagrams you want. (Once you run GIMP, the plugin can be found in Filters > Render > Pattern > Voronoi ).

You can download GIMP for Windows here:
http://www.gimp.org/windows/

Tim Mitchell

jwarrend
Offline
Joined: 08/03/2008
Voronoi generator

Re: the math behind the Voronoi construction. Let's say you have an array of "objects" on a surface -- the array can be regular or not, the objects can have size or be infinitesimally small.

Each object's "Voronoi cell" is that set of points that are closer to that object than to any other object. So the "grid" that you see in the first link you provided actually represents the boundaries between the Voronoi cells of the black dots.

One way to generate a Voronoi construction is to (lightly) draw a line between each pair of objects, and then draw the perpendicular bisector of each line. You then connect up the perpendicular bisectors that form the smallest cell.

Hope this makes sense; it's a very easy concept but easier to explain graphically than in words.

-Jeff

Scurra
Scurra's picture
Offline
Joined: 09/11/2008
Voronoi generator

jwarrend wrote:
. You then connect up the perpendicular bisectors that form the smallest cell.
Your explanation was going fine up to this point. Without having seen one of these diagrams (I haven't followed any of the links so far), I can't quite visualise what that last step is. What is the "smallest cell"?

jpfed
Offline
Joined: 12/31/1969
Voronoi generator

Pov-ray is a program that takes text descriptions of a 3d scene and renders them into a 2d image file.

One of the textures that can be assigned to an object is a Voronoi diagram. So if you render a plane, or a box big enough to take up the entire viewing area of the camera, and give that shape this Voronoi texture, then you'll get an image file filled with a Voronoi diagram.

You can control the size and coloration of the individual cells and their boundaries, and the size of the image overall.

Pov-ray is really cool and can do way, way more than what I just described. It's completely free, so I encourage everyone with the time and inclination to download it and play around.

The texture I mentioned above is called "crackle" in the special language that 3d scenes are described in when using this program.

Syndicate content


forum | by Dr. Radut