Take the 2-minute tour ×
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.

i don't know if this is the better place to post.

i'm coding a shperical tag cloud: i have a brunch of tags and i want to position them on a sphere surface. for doing that i'm procedurally drawing meridians and circles of latitude. on each circle of latitude i want to put some tags. of course the first circle has a smaller circumference than the middle one (the middle one is the equator and have the larger circumference). now, i want to get some rule for dividing gracefully the tags along the circles of latitude.

for example if i have 30 tags and i have fixed 6 circle of latitude a good result could be this one:

  1. circle: 3 tags
  2. circle: 5 tags
  3. circle: 7 tags
  4. circle: 7 tags
  5. circle: 5 tags
  6. circle: 3 tags

so: with 30 tags and 6 circle i can have: 3,5,7,7,5,3.

some ideas?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

If you space $2n-1$ circles equally in latitude (skipping the poles), you will have circles from $\phi=-\frac{n-1}{n}90^{\circ}$ to $\frac{n-1}{n}90^{\circ}$ by steps of $\frac {90^{\circ}}{n}$. If you space $2n$ circles equally in latitude (skipping the poles), you will have circles from $\phi=-\frac{2n-1}{2n}90^{\circ}$ to $\frac{2n-1}{2n}90^{\circ}$ by steps of $\frac {90^{\circ}}{n}$. In either case, the circumference of the circle of latitude is proportional to $\cos \phi$. So you can add up all the $\cos \phi$'s to get the total length, divide by the number of tags to get a length per tag, and divide the length of each circle by the length per tag to get the number on each circle. You may have to do a bit of rounding to get it to come out. If you do this, the number of tags per circle will increase rapidly as you leave the poles and not so fast when you approach the equator. See if it does what you want.

If you want the spacing in each direction to be about the same, the number of tags on the latitudes nearest the equator should be about twice the number of circles.

share|improve this answer
add comment

Your Answer

 
discard

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.