[Math] Calculate origin of pie slices

circles

I need to draw a pie graph with slices similar to the following…

enter image description here

The required information I need to draw a single slice is the X & Y coordinate of the origin of the slice and the angle of the slice. Not too difficult to draw a single slice. However to draw slices in the fashion shown above, a new origin is required for each slice which is denoted by red dots in the image.

I can't seem to figure out a generic algorithm or formula to determine the origin of the next slice. Math is not my strongest point, but any guidance would be helpful.

Best Answer

enter image description hereHint: You have 12 slices so the central angle $360^0$ is going to be divided by 12 which will give you the angle of separation for each slice, ie. ($\frac{360^0}{12}=30^0$).

This is literally the unit circle( just use a pie of radius 1), anddelete the angles $45,135,225,315$. Lastly, just write equations for line that go through those points and the origin, Notice you will only need to make 4 equations of lines.

Related Question