Comment 4 for bug 171901

Revision history for this message
Alvin Penner (apenner) wrote :

 Attached is a proposed extension that will generate a Voronoi diagram as a pattern. It shows up on the menu as Extensions->Generate from Path->Voronoi Pattern. It will create a pattern for the selected object, and the pattern Voronoixxxx can then be accessed from the Fill and Stroke dialog.
 The original algorithm and C code is from Steven Fortune, 1987 (voronoi.tar):
- http://ect.bell-labs.com/who/sjf/
- "A Sweepline Algorithm for Voronoi Diagrams", Algorithmica (1987) 2:153-174
 The Python translation of this code is from Bill Simons, 2005 (voronoi.py)
- http://www.oxfish.com/

 The extension consists of three files, voronoi.py, generate_voronoi.py, generate_voronoi.inx. The average size of the cells is adjustable. The extension will occasionally crash if the cell size is small. In this case the best thing to do is just retry, since the crash is a Python exit, not an Inkscape crash.

 Any feedback would be welcome...