Talk:Voronoi diagram: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Metrics: not really)
m (→‎Metrics: typo)
Line 11: Line 11:
[[file:voronoi-taxicab-small.png|left]] 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.
[[file:voronoi-taxicab-small.png|left]] 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.
:: This is a solid point, but it is likely also true for any Euclidean version. Especially if the picture/map is based on a x/y-coordinates in integer form. --[[User:Jofur|<Jofur>]] 05:39, 23 July 2011 (UTC)
:: This is a solid point, but it is likely also true for any Euclidean version. Especially if the picture/map is based on a x/y-coordinates in integer form. --[[User:Jofur|<Jofur>]] 05:39, 23 July 2011 (UTC)
::: For Euclidean metric it's not a problem, because if a point has the same distance to two distince sites, it must lie on the central dividing line between them, so you'll never have a 2d area from that. --[[User:Ledrug|Ledrug]] 18:35, 23 July 2011 (UTC)
::: For Euclidean metric it's not a problem, because if a point has the same distance to two distinct sites, it must lie on the central dividing line between them, so you'll never have a 2d area from that. --[[User:Ledrug|Ledrug]] 18:35, 23 July 2011 (UTC)

Revision as of 18:35, 23 July 2011

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.

This is a solid point, but it is likely also true for any Euclidean version. Especially if the picture/map is based on a x/y-coordinates in integer form. --<Jofur> 05:39, 23 July 2011 (UTC)
For Euclidean metric it's not a problem, because if a point has the same distance to two distinct sites, it must lie on the central dividing line between them, so you'll never have a 2d area from that. --Ledrug 18:35, 23 July 2011 (UTC)