# Dividing circle into six equal parts and know the coordinates of each diving point …

I have a circle who center(0,0) and radius(100) is known. That circle is divided into 6 equal parts. I want to know the coordinates of all six points on the circle that divides it into 6 parts. Can anyone please tell me the formula for this as I need to do this in a javscript code.

Also give a formula for doing the same thing with ellipse given the same data, center(100), x-radius and y-radius, are known.

-
added the ellipse ;) –  Alex Oct 3 '12 at 19:15

If it's divided into 6 equal sectors, then you can calculate the angle $\theta$ (in radians) of each of the lines to the positive $x$-axis simply by doing:

$$\theta_{n}=\frac{2n\pi}{6}=\frac{n\pi}{3},\qquad\text{where }n=\{0,1,2,3,4,5\}$$

To calculate the cartesian co-ordinates of the points, all you now need to do is convert the polar form $100\angle\theta_{n}$:

$$x_{n}=100\cdot\cos{\theta_{n}} \\ y_{n}=100\cdot\sin{\theta_{n}}$$

This can of course be extended to any number $k$ of equal area sectors of a circle of origin $(x_{0},y_{0})$ and radius $r$ using:

$$\theta_{n}(k)=\frac{2n\pi}{k},\qquad \text{where }n=\{0,1,\dots,k-1\}$$

Then, converting from polar co-ordinates and translating: $$x_{n}=r\cdot\cos{(\theta_{n}(k))}+x_{0} \\ y_{n}=r\cdot\sin{(\theta_{n}(k))}+y_{0}$$

-
what changes are needed if am calculating with respect to y axis –  Gaurav Sachdeva Oct 3 '12 at 16:27
@Gaurav Sachdeva If I understand you correctly, exchange cos' and sin's. –  Alex Oct 3 '12 at 16:28
@Alex, wat i meant was, instead of calculating angles to positve x-axis, i am calculating angle to positive-y axis...so the above change will do ?? –  Gaurav Sachdeva Oct 3 '12 at 16:29
@Gaurav Sachdeva So, 0 = top, 90 = left, 180 = bottom and 270 = right? –  Alex Oct 3 '12 at 16:31
yes..thats right –  Gaurav Sachdeva Oct 3 '12 at 16:32

Here, the very generalized formula :) (including ellipse)

$r_x$ and $r_y$ being the radius on the x-axis and y-axis respectively. $\alpha$ is the angle of the rotation of all points. i.e. $\alpha = \frac{\pi}{2}$ would rotate all points counter-clockwise by 90 degrees. $M_x$ and $M_y$ are the center coordinates. And finally, $n$ is the number of segments.

$$\theta = \frac{2\pi}{n}\cdot k+\alpha\qquad \text{,where }k\in \left \{ 0,1,2,...,n-1\right \}$$ $$\text{Now,}\ x = M_x + r_x\cdot\cos(\theta)\text{ and }y=M_y + r_y\cdot\sin(\theta)$$

-
thanks alex for the answer... :) –  Gaurav Sachdeva Oct 3 '12 at 16:45
thankyou so much alex....you made my day :) –  Gaurav Sachdeva Oct 4 '12 at 6:34

use phythogorus theorem by the ratio of triangle $1:2:\sqrt3$ ,and add the radius. then you can acheive thee co ordinates,,,first draw rough diagram of circle ,and divide in to three equaal parts ,then join the points,,you will see a triangle of equal sides,then again draw a half triangle from the centre,,now use phythogorus theorem .by above ratio ,,ahhhh you have got the co ordinates ..ok

-