in reply to Re^6: Placeing Tiles in a Circle
in thread Placeing Tiles in a Circle
I think for my problem, constructing the circle from three points should work
I'd love to see how you will pick the 3 points?
For your case, it should be trivial to vastly reduce the points set by excluding all those points that do not lie on the outer extremes of the grid. Eg.
*---* | | + + | | + + | | *---+---+ +---+---* | | *---+---+---+---+---* *---+---+---+---* | | + +---+---+---+ | | + +---+---+---+---* | | *---+---+---+---+---*
Picking out the *s and eliminating the +s is fairly easy, which reduces the points vastly. But picking just (the right) three of those is much harder.
However, I am also interested in the second way. I will not be dealing with more than 20.000 tiles,
My crude, naive implementation of SEC takes ~17 microseconds per 3-point trial. With 20,000 points and an O(n3) algorithm, you'd be looking at 20,000^3 * 0.000017 = 136e6 seconds or around 4.5 years! Its a non-starter.
Again, it is probably fairly trivial to vastly reduce the point set for consideration, but you'd be better to go looking at one of the implementations of the O(n) algorithms like: miniball and others.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Placeing Tiles in a Circle
by janDD (Acolyte) on Dec 09, 2013 at 10:48 UTC | |
by BrowserUk (Patriarch) on Dec 09, 2013 at 15:42 UTC | |
by janDD (Acolyte) on Dec 12, 2013 at 16:47 UTC | |
by BrowserUk (Patriarch) on Dec 12, 2013 at 17:52 UTC |