I n number of divs which are arranged in a circle using javascript. Right now i set the dimension of each div to 40*40. Below is what i am able to achieve so far. This is how i find X & Y of each div.
x = 100 * Math.cos(angle) + hCenter;
y = 100 * Math.sin(angle) + vCenter;
where hCenter & vCenter are center point of the screen

When there are many circles they start overlapping each other. How can i find the height & width of each div so that they fit in circle with a little space between each other.
How can i arrange the same circles in the square. Means animate from circle to square. How to find new X,Y position of each div.