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 would like to generate a set of x,y coordinates according to which thumbnails (i.e. rectangles) should appear along a spiral path so that the minimum distance between the edges of adjacent thumbnails is constant. This is to ensure that the icons are nicely displayed along the spiral so that none of them overlap or are spread too far from each other.

Given is: the number of points to generate, the dimensions of the rectangles (same for all), the minimum distance between the edges and necessary parameters for the spiral.

Here's an illustration with an approximation of what I'm trying to achieve (only in my case the rectangles all have the same size and the minimum distance between neighbouring rectangles should be constant):


What algorithm or formula should I use to do that?

Thanks in advance for your help.

share|cite|improve this question
I was able to insert your image directly into your post: you can do so by clicking on the image icon at the top of "question" field, then upload the image from your computer, or enter URL of web image. – amWhy Jun 27 '11 at 17:01

Your Answer


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

Browse other questions tagged or ask your own question.