| Trigonometry literally means the measure of triangles.
Yet, I believe that to fundamentally understand trigonometry, one must
understand the unit circle. In mathematics, unit means 1. The
Unit Circle is a circle centered at the origin of radius 1.

The cosine, sine, and tangent functions of Trigonometry are all based
off of triangles made with the unit circle. Imagine a line starting
at the origin and extending to the coordinate x = +1, y = 0.
This line then sweeps counter-clockwise. The angle (commonly called theta) is measured between the positive x-axis and the imaginary line. The
triangle created by this sweeping imaginary line always has two points on
the x-axis. The third point exists on the circle.
The cosine function is the horizontal leg of the triangle. The
sine function is the vertical leg of the triangle. The tangent
function is the vertical leg divided by the horizontal leg, or the slope
of the hypotenuse. The sine and cosine functions repeat every 360
degrees, and the tangent function repeats every 180 degrees.
Radians are an alternative to degrees. A circle consists of
radians or 360 degrees. The radian
measurement is equal to the arc-length of the curve drawn by the given
angle. For example, the angle
radians is both the circumference of the circle and the equivalent to 360
degrees.
| Note: A good programming algorithm to know is the
conversion from degrees to radians. Since OpenGL uses degrees
these functions can useful tools. float D_TO_R( float x) { return
PI / 180.0f * x; }
float R_TO_D( float x) { return 180.0f * x / PI; } |
The cosine curve, once again, is the horizontal measured distance from
the origin to the endpoint on the x-axis. Notice how it initially
begins at +1 and moves to 0 and then -1. This is mirrored by the
imaginary line pointing to the right, sweeping counterclockwise upwards
and then to the left.
The sine curve, is the vertical distance from the x-axis to the last
point on the circle. Notice that it begins at 0, and as the
horizontal line moves counterclockwise away from the positive x-axis, the
vertical distance increases, peaks, and decreases again.

The vertical lines on the tangent graph are vertical asymptotes.
Since the graph is defined as the Sine curve divided by the Cosine curve,
whenever the Cosine curve is zero, a vertical asymptote appears on the
tangent curve. This is also mirrored in the fact that the tangent
curve is the slope of the horizontal line, and whenever the horizontal
line is pointing either straight up or straight down, it's slope becomes
infinity.

|