Phase 3: Trigonometry & Geometry Intuition · ~30 minutes · Python · NumPy · matplotlib
Objective
Learning objectives
- Define sine and cosine as the y- and x-coordinates of a point on the unit circle
- Convert between degrees and radians
- Plot sine and cosine over a full revolution and connect the plotted wave to the circle it came from
- Estimate an angle's sine and cosine from the unit circle before calculating exactly
Hook
What does an angle have to do with a wave? A protractor measures angles; an oscilloscope draws waves — they look like they belong to completely different parts of math. They're the same thing, and the unit circle is exactly where that connection lives.
See it
Watch the point travel around the circle at a constant speed, and watch its height (the sine value) trace out on the right at the same time. As the point climbs from the bottom of the circle toward the top, the wave climbs too. As it descends, the wave descends. The wave isn't a separate mathematical object that happens to resemble the circle — it's a direct readout of the circle's own height over time, unrolled left to right instead of wrapped in a loop.
Cosine is the exact same idea, just horizontal instead of vertical
Everything said about sine and height applies identically to cosine and horizontal position — the green dot in the figure tracks the point's x-coordinate the same way the red dot tracks its y-coordinate. Sine and cosine aren't two unrelated functions you happen to learn together; they're the vertical and horizontal readouts of the exact same moving point.
Name it
The unit circle is a circle of radius 1, centered at the origin. For a point on the unit circle at angle θ (measured counterclockwise from the positive x-axis), cosine (cos θ) is defined as that point's x-coordinate, and sine (sin θ) is its y-coordinate — nothing more exotic than that.
Radians are an alternative way to measure angles, based on the circle itself rather than an arbitrary "360 pieces" convention: one full revolution is 2π radians (about 6.283), matching 360°. Degrees and radians measure the same angles; converting between them is radians = degrees × (π / 180).
Code it
import math
for deg in [0, 30, 45, 60, 90, 180]:
rad = math.radians(deg)
print(deg, round(rad, 4), round(math.cos(rad), 4), round(math.sin(rad), 4))
0 0.0 1.0 0.0
30 0.5236 0.866 0.5
45 0.7854 0.7071 0.7071
60 1.0472 0.5 0.866
90 1.5708 0.0 1.0
180 3.1416 -1.0 0.0
At 0°, the point sits at (1, 0) — cosine 1, sine 0, exactly the rightmost point on the circle, matching the figure's starting position. At 90°, it's climbed to the very top, (0, 1) — cosine 0, sine 1. Those aren't separate facts to memorize; they're just where the point physically is.
import numpy as np
import matplotlib.pyplot as plt
angles = np.linspace(0, 2 * np.pi, 200)
plt.plot(angles, np.cos(angles), label="cos(θ)")
plt.plot(angles, np.sin(angles), label="sin(θ)")
plt.xlabel("θ (radians)")
plt.legend()
plt.savefig("sine_cosine_wave.png", dpi=150, bbox_inches="tight")
This is the code equivalent of the figure's right-hand panel — np.linspace(0, 2*np.pi, 200) sweeps θ around one full revolution, and plotting sin and cos against it produces the exact wave shapes the animated point was tracing live.
import math
for deg in [120, 210]:
rad = math.radians(deg)
print(deg, round(math.cos(rad), 4), round(math.sin(rad), 4))
120° is in the upper-left of the circle (past 90°, before 180°) — negative x, still-positive y, matching cos = -0.5, sin = 0.866. 210° is in the lower-left (past 180°, before 270°) — both coordinates negative, matching cos = -0.866, sin = -0.5. Same "where is the point" reasoning as every value in Code It, just at two new angles.