开发者

Translating radians to degrees

开发者 https://www.devze.com 2022-12-15 14:14 出处:网络
I noticed that translating 开发者_如何学Cradians to degrees and vice versa is like translating a percentage to a whole number and vice versa. For example, to get 60 percent of 345 you do the following

I noticed that translating 开发者_如何学Cradians to degrees and vice versa is like translating a percentage to a whole number and vice versa. For example, to get 60 percent of 345 you do the following

60 * 345/100

to convert 60 degrees to radians you do

60 * 3.14/180

There is a pattern there BUT... we use 100 to compare percentages to a number. So, why do we use 180 degrees instead of 360 degrees to compare degrees to radians?

%100 percent = a whole number 360 degrees represents a whole circle

using 180 degrees is like using 50% instead of 100%

I hope I am making some sense. Can anyone answer? Thanks


The reason you use 180 degrees instead of 360 is that there are 2*pi radians in a circle, not pi. Thus you divide both 360 and 2*pi by 2 and get pi and 180.


In Mathematica, I use the handy predefined Degree constant for conversions, which is defined as Pi/180 or 2 * Pi/360.

The reason there are 2 * Pi radians in a circle is that the size of an angle in radians is the length of the arc of a circle with radius 1 that subtends it. The circumference of a circle with radius 1 is 2 * Pi. In addition to providing a clear geometrical interpretation, using radians also makes a number of other relations much more convenient; cosine is the derivative of sine, and as a result the Maclaurin series for sines and cosines are much simpler than they would be for angles expressed in degrees.


360 degrees = 2 * Pi radians

1 degree = Pi / 180 radians


I guess your question is, why there 360 degrees in a circle (or 180 in a semicircle), and why not some other more tenable number like 100.

The answer to that is the origin of degree. If you'd like to use a round figure, check out the gradian unit of angles.

PS: SO is for programming questions only. This is not programming related.


I ask this question because my lack of paying attention in school. Programming actually is the reason I ask this question because it is now that I am actually paying attention. Every programming formula uses 180 and PI to translate back and forth instead of 360. Since I haven't came across any examples, I assumed that there was only one way. Of course if I was reading a regular math book, I would of known differently.

But I understand now. Actionscript uses 180 degrees for clock wise rotation. once 180 is reached, it uses -180 back down to 0 for a full rotation. Which makes alot more sense if you want your answer to fall in the 180 degree range. and depending on if its negative or positive determines whether or not it is traveling up on the x axis or down and y axis as well. As much as I appreciate the responses, I believe this is absolutely a suitable programming question. For programmers calculating in degrees is different from your average surveyor.

Given a real life scenario, measuring a distance is always considered a absolute value, where programming this is false. which also rationalizes why we use -180 degrees.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号