Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I asked a similar question on SciComp, but it is a little out of the domain, so I thought I'd give it a try here as well.

Give n points, I would like to place them in a periodic box (periodic such that the distance between two points "wraps around" to the other side) so that the minimum distance between any two points is as large as it can possibly be.

How do I do this? I imagine analytically this could be quite difficult, but is there at least a numerical procedure?

share|cite|improve this question
Place them on a hexagonal grid? I believe that is the densest packing. If the numbers don't fill up the points on the grid, it gets hairy. There are packing problems (some proposed by Kepler, and still unsolved) for spheres, perhaps 2D is simpler. – vonbrand Mar 24 '13 at 15:11
Yeah, it won't fill up the grid evenly. I'm trying to place 361 points at the moment. – Nick Mar 24 '13 at 15:15
up vote 2 down vote accepted

This kind of problem is very hard. You might have a look at packomania which has solutions for many numbers of circles in squares and rectangles. Most of them are found experimentally and not proven to be maximal. You can almost incorporate the wraparound by shrinking the square or rectangle by the radius in each direction, but I don't think it gets the corners right.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.