On 4/25/07, bulia byak <buliabyak@...155...> wrote:
On 4/24/07, Terry Brown <terry_n_brown@...12...> wrote:
I don't think inkscape has that. Looks like the POV-ray pattern 'Crackle':
http://www.povray.org/documentation/view/3.6.1/372/
--clip-- Mathematically, the set crackle(p)=0 is a 3D Voronoi diagram of a field of semi random points and crackle(p) < 0 is the distance from the set along the shortest path (a Voronoi diagram is the locus of points equidistant from their two nearest neighbors from a set of disjoint points, like the membranes in suds are to the centers of the bubbles).
By the way, this might make a useful Python effect for Inkscape: Fill the inside of a path with random points and build a Voronoi diagram (as a set of polygon paths) of these points, or of the path's nodes, or both. Any takers?
Doing Voronoi diagrams (and delaunay triangulations) robustly is tricky. Simpler algorithms tend to barf on input that has too many collinear points, or has points placed exactly on a grid. And the textbook implementations usually avoid constraints altogether. But the Triangle lib by Jonathan Shewchuk handles all that and more quite beautifully and can create both Voronoi diagrams and Delaunay triangulations of the interiors of arbitrary polygons. (Arbitrary in the sense of being concave and having holes. Probably not self-intersecting ones, though I haven't tried that).
http://www.cs.cmu.edu/~quake/triangle.html
The license is a bit odd though. Has some odd advertising requirements and commercial product restrictions: ------------------------------------------------------------------------------
These programs may be freely redistributed under the condition that the copyright notices (including the copy of this notice in the code comments and the copyright notice printed when the `-h' switch is selected) are not removed, and no compensation is received. Private, research, and institutional use is free. You may distribute modified versions of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. Distribution of this code as part of a commercial system is permissible ONLY BY DIRECT ARRANGEMENT WITH THE AUTHOR. (If you are not directly supplying this code to a customer, and you are instead telling them how they can obtain it for free, then you are not required to make any arrangement with me.) ------------------------------------------------------------------------------
The author might be willing to make such a DIRECT ARRANGEMENT with inkscape folks. Worth contacting him. I've not found anything better for making "nice" triangulations of shapes.
--bb