Talk:Voronoi diagram

From Rosetta Code
Revision as of 21:47, 22 July 2011 by rosettacode>Ledrug (→‎Metrics: PureBasic code flaw)

Task?

The task as given in the sample Python code is rather boring. How about calculating vertices of the Voronoi tessellation, or draw a map of it, or some such? --Ledrug 05:18, 19 July 2011 (UTC)

Whether a task is interesting shouldn't be cause for criticism. Start with the basics and if you want more fun add more complicated, related tasks. --Mwn3d 12:12, 19 July 2011 (UTC)

Also the task description does not say what needs to be accomplished. --Paddy3118 05:45, 19 July 2011 (UTC)

Judging by the example code, it's probably this: given a number of sites and a set of grid points, for every site find all the grid points that are closest to it, which boils down to a distance comparison. --Ledrug 05:56, 19 July 2011 (UTC)

Metrics

It's fun to compare the diagrams induced by different metrics (e.g., the taxicab metric). All it takes is a change of measurement function. –Donal Fellows 14:52, 21 July 2011 (UTC)

Taxicab metric does give some interesting result.
--Ledrug 00:41, 22 July 2011 (UTC)

More about taxicabs: since the PureBasic solution provided a taxicab version, I'll have to point out that this metric has a special case not handled by it. When two sites are aligned at exactly 45 degrees, there may be a region (instead of a line) that's equal distance to both sites, as seen in the small image to the left: every point in the gray area is same distance from both orange and blue site.