adamreis/watermelon — pull request #14 by Aalk4308 (2014-11-01 21:31:32+00:00)
Title: Physical packing fix

I've adjusted the physical packing algorithm so that it doesn't give up too soon. Previously, by only trying a seed at the sparsest location, it could give up too early on maps like this:
5 3.1
5 7
3 5
7 5

The point (5,5) is quite sparse (just a small overlap from the tree above it), but the seed will never be able to fit there, so the algorithm will terminate. However, there may have been slightly more dense areas elsewhere that the algorithm could have succeeded for.

Now, it tries all locations (sparse or not) as long as they're not heavily overlapped with existing ones.

Note: This branch also includes the best known packing work, so that pull request can be deleted.