Working with Radians
When you are programming with math functions, you may have noticed that they use radians instead of degrees. This might throw you off a bit at first, but with a little practice, you will see the advantages of working with radians over degrees.
First, what is a radian?
A radian is a way of measuring an angle based on the radius of a circle. One radian is equal to the angle that is subtended by an arc that is equal in length to the radius of a circle.
Okay, so what is a radian again? This time in plain common tongue.
Consider the diagram below.
We have a circle. A line drawn from the center of the circle to the outside edge is a radius. I have called it r. Then I have another radius going at an upward angle. The two radii cut off a section of arc length called s. Let's say that s is equal in length to r. This creates an angle, drawn in yellow, that is equal to 1 radian.
This makes a radian roughly equal to 57.3 degrees.
A complete circle, or 360 degrees, is roughly equal to 6.28 radians.
You can represent an angle in radians using the Greek letter Theta Θ.
What? Radians don't divide evenly into a circle and you need Greek letters! I really don't see any advantage here.
Okay then, let's say that the arc length s was not equal to my radius r. Let's say that I was only given the angle in degrees, set to 60 degrees and a radius of 2. Now I want to find the length of s. I might consider my formula for circumference.
C = 2πr
Since I don't need to know my entire circumference, I will take only that portion of my circumference that I need. How much? How about 60/360? That looks right. 60/360(2πr).
Next, simplify the equation. 60/360(2πr) becomes 60/180(πr). Using that formula, with a radius of 2, I get an arc length of roughly 2.094.
Now, let's try a similar problem using an angle in radians. Here is the new problem. This time we will have an angle set to .5 radians. We will still have a radius of 2. So, what is our arc length?
To solve this in radians, we use the formula Theta Θ(r). Or in this case, .5(2). The resulting arc length would equal 1.
That was much easier than the formula using degrees. We did not have to mess with Pi or anything like that. How is that possible?
I suppose it has to do with what radians are actually equal to. You see 360 degrees in radians is roughly equal to 6.28. But it is exactly equal to 2π. Also, 180 degrees is equal to π, and 90 degrees is equal to 1/2π.
That is all rather convenient, actually. And, perhaps, it is for this reason that radians are accepted as the default unit of measurement when dealing with angles.
If you say an angle measures 5 and you mean 5 degrees, then you must say the angle measures 5 degrees. If you just say it measures 5, then radians are assumed.
And that is why all the math functions are set up to use radians as the default unit.
If you are into coding, learn to love those radians.
Just a quick note. To convert from degrees to radians use this formula.
degrees(π)/180 = radians
To convert radians to degrees, use this formula.
radians(180)/π = degrees
Thank you for reading.
Comments
Post a Comment