in reply to Re: Better maps with Math::Geometry::Voronoi, and a Challenge for Math Monks
in thread Better maps with Math::Geometry::Voronoi, and a Challenge for Math Monks
I used your code and examined the results of all the output arrays. From what I can see, it appears that the extra vertices are due to extra lines. Not extra in the sense that they're not valid, just in that they're unnecessary/unwanted. In the case of a square of four points (Pll, Pul, Plr, and Prr where u=upper, l=lower/left, r=right), you expect a line between Pll and Pul, you also expect a line between Pll and Plr. But a line between Pll and Prr is also valid. Since they intersect at a single point you don't need the last one. I suspect that the code is either experiencing just enough rounding error to insert the extra points, or that the code simply has all those three lines as boundaries, and it simply computes duplicates as it walks through the list of lines.
...roboticus
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Better maps with Math::Geometry::Voronoi, and a Challenge for Math Monks
by BrowserUk (Patriarch) on Jul 03, 2008 at 21:05 UTC | |
by roboticus (Chancellor) on Jul 03, 2008 at 23:01 UTC | |
by BrowserUk (Patriarch) on Jul 03, 2008 at 23:52 UTC |