Graphics Programs Reference
In-Depth Information
Just about everybody knows that there are 360 degrees in a circle, but not too many
people know why. Do you? Well, we don't either. Somewhere along the way, someone
decided that it would be convenient to have a circle divided into 360 parts, perhaps as
an approximation to the number of days in a year.
Unfortunately for many of us and especially those working with ActionScript, there is
another unit of angle measurement called radians. A long time ago, some Greek was
thinking about circles and said to himself, “Suppose I have an arc of a circle that is
equal in length to the radius of the circle. I'll call the angle that the arc makes a radian.
I wonder how many of those make up half a circle. Wouldn't it be nice if the number
were a whole number?”
r
x
r
angle = 1 radian
r
y
Figure 5.6 One radian of a circle
It certainly would have been nice if three or four made up a semicircle but alas, it was
not to be. It turned out that a little more than three radians make up a semicircle. The
Greeks found that the number is about 3.14159 and is often written as the Greek let-
ter p . Flash refers to this number as Math.PI so that you don't have to remember it in
order to use it.
“That's interesting,” you may be thinking, “but why should I care about any of this?”
The reason is that while most of us feel comfortable measuring angles in degrees, the
folks who write software such as Flash prefer to measure angles in radians. So, like it
or not, we often need to bounce back and forth between degrees and radians.
Figure 5.7 provides the necessary formulas that you will need for converting from one
to the other. Note that there are 360 degrees or 2 p radians in a circle. Try to learn them
if you can or write them down on your hand or just refer to these equations when you
need them.
 
Search WWH ::




Custom Search