i
i
i
i
i
i
i
i
18 2. Miscellaneous Math
2.3 Trigonometry
In graphics we use basic trigonometry in many contexts. Usually, it is nothing too
fancy, and it often helps to remember the basic definitions.
2.3.1 Angles
Although we take angles somewhat for granted, we should return to their defini-
tion so we can extend the idea of the angle onto the sphere. An angle is formed
between two half-lines (infinite rays stemming from an origin) or directions, and
some convention must be used to decide between the two possibilities for the an-
gle created between them as shown in Figure 2.6. An angle is defined by the
length of the arc segment it cuts out on the unit circle. A common convention is
that the smaller arc length is used, and the sign of the angle is determined by the
Figure 2.6. Two half-
lines cut the unit circle into
two arcs. The length of
either arc is a valid an-
gle “between” the two half-
lines. Either we can use the
convention that the smaller
length is the angle, or that
the two half-lines are spec-
ified in a certain order and
the arc that determines an-
gle φ is the one swept out
counterclockwise from the
first to the second half-line.
order in which the two half-lines are specified. Using that convention, all angles
are in the range [−π, π].
Each of these angles is the length of the arc of the unit circle that is “cut” by
the two directions. Because the perimeter of the unit circle is 2π, the two possible
angles sum to 2π. The unit of these arc lengths is radians. Another common unit
is degrees, where the perimeter of the circle is 360 degrees. Thus, an angle that is
π radians is 180 degrees, usually denoted 180
◦
. The conversion between degrees
and radians is
degrees =
180
π
radians;
radians =
π
180
degrees.
2.3.2 Trigonometric Functions
Given a right triangle with sides of length a, o,andh,whereh is the length of
the longest side (which is always opposite the right angle), or hypotenuse,an
important relation is described by the Pythagorean theorem:
a
2
+ o
2
= h
2
.
You can see that this is true from Figure 2.7, where the big square has area (a+o)
2
,
Figure 2.7. A geo-
metric demonstration of the
Pythagorean theorem.
the four triangles have the combined area 2ao, and the center square has area h
2
.
Because the triangles and inner square subdivide the larger square evenly,
we have 2ao + h
2
=(a + o)
2
, which is easily manipulated to the form above.