Radian and angle Conversion

Source: Internet
Author: User
Tags in degrees mathematical functions

In the past two days, I have read the quad-tree code written by my colleagues, and used the conversion between the degree of loneliness and angle. So I reprinted this article and learned it.

 

01 radian relationship with angle 1. Two angle units
Radians and degrees are two different units of the measurement angle. Just like "meters" and "city ruler" are two different units that measure the length.
In flash, the angle in rotation is measured in degrees, and the angle in trigonometric functions is measured in radians. This rule must be remembered first !!! For example, rotation2 -- is the rotation "2 degrees"; sin (π/2) -- is the sine of the angle of the "π/2 radian.

Ii. radians
The so-called "radian definition" means how the angle size of 1 radian is defined?
We know that "degree" is defined as "two rays are emitted from the center of the circle to the circumference to form an arc with a positive angle and angle. When the arc length is equal to one of the 360 points in the circumference, the angle between the two rays is 1 degree. (1)

How is radian defined? Radians are defined as follows: two rays are emitted from the center of the circle to the circumference, forming an arc with a positive angle and an angle. When the arc length is equal to the circle radius, the angle between the two rays is 1 radian. (2)
For example, the two definitions of degrees and radians are very similar. They differ only in the ARC lengths of different angles. Degrees are one of the 360 points of the circumference, while radians are equal to the radius.
To put it simply, radians define that when the arc lengths of an angle are equal to the radius, the angle size is 1 radian.


The pictures related to this topic are as follows:




The arc length of an angle is several times the radius, and the angle size is several radians.
Their relationships can be expressed and calculated in the following formula:
Angle (radian) = arc length/radius
The circumference of a circle is 2 π times the radius, so a circumference (360 degrees) is 2 π radians.
The length of the semi-circle is π times the radius, so an angle (180 degrees) is π radian.

Iii. Conversion between degrees and radians
According to the above, an angle is π radian.
That is, 180 degrees = π radians
We can see that:
1 degree = π/180 radian (≈ 0.017453 radian)
Therefore, the formula for converting degrees into radians is obtained:
Radians = degrees x π/180
For example:
90 ° = 90 × π/180 = π/2 radian
60 ° = 60 × π/180 = π/3 radian
45 ° = 45 × π/180 = π/4 radian
30 ° = 30 × π/180 = π/6 radian
120 ° = 120xπ/180 = 2 π/3 radian

In turn, how is the radians converted into degrees?
Because π radian = 180 °
So 1 radian = 180 °/π (≈ 57.3 °)
Therefore, we can get a formula to convert radians into degrees:
Degrees = radians × 180 °/π
For example:
4 π/3 radian = 4 π/3 × 180 °/π
= 240 °

Some friends may say that it is very easy to get wrong whether it is multiplied by "π/180" or "180 °/π. In fact, you only need to remember: π is π radians, and 180 is 180 degrees. If I want to become a unit, I need to put it on the numerator. That is to say, to convert it into a radian, we need to put the π radian on the numerator -- multiply by π/180. In addition, 1 is much smaller than 1 radian, about 0.017453 radian (π/180 ≈ 0.017453 ). So after degrees are converted into radians, the number must be smaller, so the radians must be multiplied by π/180. You can think about it like this.

In the as code, "π" is written as "Pi ". Because "π" and "sin" are all "mathematical functions", we should add "math" to the front according to the regulations. "(math is the abbreviation of" Mathematics "in English. pi "," math. sin ".
Therefore, sin30° must be written as math. Sin (30 * Math. PI/180 ). When the part in a small arc converts 30 ° into a radian, that is, 30 × π/180.

Radian and angle Conversion

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.