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 have a Cartesian plane running from -41 to 41 on the x and y axes and a circle centered on 0,0 with a radius of 41 divided up into a number of sections of different areas. I know the percentage area of each section (ie: section 1 is 16.1% of the total area of the circle, section 2 is 13% of the total circle, etc -- think pie chart).

I need to calculate the x and y coordinates of the circumference points for each of the dividing lines of the section.

I am trying to programatically draw a 'pie chart' by dividing the circle into a number of points on he circumference from 0,0.

Here is my calculated data:

enter image description here

share|improve this question
    
Are you given that the first section begins at $(41,0)$? It seems like unless you are given some starting point, the solution set would be closed under rotations. –  A.E Jul 1 '13 at 17:50
    
By section, you mean sector right? –  OmerPT Jul 1 '13 at 17:51
    
@Orangutango The first section begins at 0,41 –  Art Jul 1 '13 at 17:52
1  
Do you have knowledge of Trigonometry? because your question is pretty simple and the basic trigonometric functions are exactly what you need. –  OmerPT Jul 1 '13 at 17:53
    
@OmerPT I did about 20 years ago and have been trying to recall based off of posts on here. From what I could gather, if i could find the angle of each section, the cos(angle) = x and the sin(angle) = y. I attempted to multiple the percentage of each sector times 360, since there are 360 degress in a circle. I figured that each one of these would be the individual angle of the sector, and I could add all of the previous angles to get the current total angle –  Art Jul 1 '13 at 17:57
show 5 more comments

1 Answer

up vote 1 down vote accepted

The angle represented by each percentage is just that percentage multiplied by $2 \pi$. So if the first sector starts at $(41,0)$, horizontal to the left, and we go clockwise, the terminating point for that sector is $(41 \cos (0.161\cdot 2 \pi), -41 \sin (0.161\cdot 2 \pi)) \approx (21.75,-34.75)$, where the minus sign comes from going clockwise instead of counterclockwise. The total angle of sectors $1$ and $2$ is then $0.291$ of the circle, so the ending point will be $(41 \cos (0.291\cdot 2 \pi), -41 \sin (0.291\cdot 2 \pi))\approx(-10.45,-39.58)$

share|improve this answer
    
Thank you very much for an example using my data. It really helped crytalize the procedure. –  Art Jul 1 '13 at 19:26
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.