Latest Uploads
Shields 64x64

Pakz

Ffs_Spam

Jayenkai

Hives Screen shot

rychan

Rpg Potion Sprites

Pakz

Super Shap ... ration Kit

Andy_A

Platdude Spotting

Jayenkai

Articles + Tutorials > Advanced Techniques ( Created 18 September 2013 | Last Edited 18 September 2013)

Maths 101 - Episode 0: Degrees and Radians by shroom_monk | No Votes
An introduction to a series of maths articles, starting with an overview of degrees and radians
For general use
Hello everyone! So, I've decided to write a few articles on various interesting bits of maths, most of which will probably be applicable to some coding task or another, as well as for general interest. Different topics will be split across different posts, and we'll see how it goes! I'm open to any questions or requests.

Degrees

Chances are you already know what degrees are, but I'm going to briefly define them here for ease of comparison to radians in a minute.

Degrees are a unit, but rather than measuring length, weight or time, they measure angles. A full rotation is defined to be 360 degrees. Why 360? It's a hang-on from the base-60 counting methods of old, and is useful because 360 is actually divisible by quite a lot of numbers.



We use degrees because they're easy for us to deal with. But if you've ever done any coding with trigonometric functions (sin, cos, etc, which I'll cover next time), you may have found, depending on the language you're using, that the functions do not give the results you expect. This is probably because those functions were set to use radians rather than degrees.

Radians

Radians are a different unit for measuring angles, like how metres and feet are different measures for length. One radian is approximately equal to 57.3 degrees, but this is not a good definition.

The true definition of a radian is this: imagine you have a sector of a circle (shown below). This sector will enclose an angle, which we shall call theta (theta, written θ, is the Greek letter often used to represent angles), and will also have a radius, which we shall call r.

The angle theta will have a value of 1 radian if the length of the arc that encloses the sector is equal to r, the radius.



Simple! But why should we care? Surely degrees are a much more intuitive way of measuring angles? Well, it turns out that the radian has lots of interesting mathematical properties that make it much easier to do maths if we use radians instead of degrees.

For instance: the ratio of the radius of a sector to the length of its arc is constant, so if we have a sector with angle theta radians, then the length of the arc is equal to theta * r. Now, there are exactly 2*pi radians in a complete rotation, so as a consequence of this, the circumference of a circle is the angle it encloses multiplied by its radius - so 2 * pi * r!

Summary

  • We usually use degrees to measure angles because they're easy to comprehend.
  • Radians are an alternative unit, where a circle sector whose arc is the same length as its radius is said to enclose an angle of 1 radian.
  • The length of a circle sector's arc is the angle it encloses multiplied by its radius.
  • There are 2PI radians in a circle, so 180 degrees = PI radians.
  • Different programming languages will have their maths libraries set to use either radians or degrees, but many will use radians because they have many useful mathematical properties. Usually, maths libraries will provide a conversion function between the two units.

So, that's degrees and radians. I thought it would be useful to get this out of the way now, to avoid problems for next time, when we will look at some trigonometry.

BONUS ROUND: Gradians

This section is something of an extended footnote for those who are interested, and can happily be ignored. Gradians (or grads) are a third unit for angles, which you may have noticed floating around if you've ever played about with a scientific calculator.

Gradians were invented by the French back when the metric system was gaining popularity. They figured it would be good to measure our angles in metric as well, so invented grads, where one right angle was equal to 100 grads (rather than 90 degrees), making one full rotation equal to 400 grads.

Of course, 360 is divisible by many more numbers than 400 (for instance, the very useful 30 degrees is an awkward 33⅓ grads), so it never caught on. They're all but forgotten now, and serve no particularly useful purpose.

There are no comments for this entry. -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 740|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
Pokitto
Jayenkai Sun 02:00
Arduboy Owners Club
spinal Sun 01:35
Slow News
Jayenkai Sat 23:36
AGameAWeek : 2017 - Part One
Jayenkai Sat 08:31
Facebook Group
rskgames Fri 10:47
Possible LCD experimentation imminent.
steve_ancell Fri 10:30
1-2-...Never Mind
rockford Fri 07:12
Buy Zelda
rockford Wed 16:00
What Have You Done? - April 2017
rychan Wed 06:43
I Hear Voices
Jayenkai Tue 04:30
More

Latest Items
Showcase : Read Error A
Jayenkai Sat 08:28
Showcase : Hives
rockford Wed 12:53
Showcase : Quadoban
rskgames Fri 10:11
Blog : My Arduino experience.
steve_ancell Wed 17:02
Showcase : Roguelike Explorer
Pakz Fri 06:59
Showcase : Infinitron
Jayenkai Mon 07:50
News : Newsletter #311
Jayenkai Thu 17:27
Link : Super Shapes Exploration Kit
Andy_A Thu 11:09
Dev-Diary : Sensitive - Arduboy!
rychan Thu 17:27
Snippet : Skylines
steve_ancell Tue 14:25
Dev-Diary : PS2 to N64 Adapter
spinal Sun 10:49
Link : Vector Tutorials/Help page.
Pakz Thu 23:00
Blog : mini project
spinal Sun 10:13
Snippet : Wall Tracing on Random Maps (rpg)
rskgames Wed 22:48
More

Who's Online
Pakz
Sun, at 20:05
rskgames
Sun, at 18:45
steve_ancell
Sun, at 18:43
rychan
Sun, at 16:55
Jayenkai
Sun, at 16:44
HoboBen
Sun, at 13:30
rockford
Sun, at 13:27
spinal
Sun, at 13:02
9572AD
Sun, at 11:47
zzoom
Sun, at 09:45
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.