in reply to Re^8: Placeing Tiles in a Circle
in thread Placeing Tiles in a Circle
First find the convex hull of all tiles. Then, ... I calculate the minimum circle by doing it with brute force...The algorithm is fast enough for all practical examples, I checked.
Indeed. As all your points live on a regular grid and large numbers of them will be 'inside'; and of the outermost, many will be eliminated by being co-linear, the convex hull should always reduce to a manageable number for brute force.
For quite a while I thought that -- for the specific case of your regular grid -- the convex hull algorithm could be avoided by finding the 3 points 'by inspection'. Indeed, if your tiles were square, it is, but for the generality of rectangular tiles, I couldn't find a reliable way.
I have to say, it offends me intellectually to know that there are several O(n) algorithms (for the {smallest/minimum/bounding} {enclosing/encircling/} {circle/disk/ball/sphere} problem) out there, and yet I found it impossible to find either a clear description; or a correct and usable implementation :(
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Placeing Tiles in a Circle
by janDD (Acolyte) on Dec 12, 2013 at 16:47 UTC | |
by BrowserUk (Patriarch) on Dec 12, 2013 at 17:52 UTC |