Chris Collins

Tools · math

Unit circle and waves

Drag round the unit circle and watch it unwrap into sin and cos, with quadrants, reference angles and exact values; find every solution of sin x = k; see radians as arc length and sin θ/θ → 1; fit A sin(B(x − C)) + D to the book's daylight and tide data; watch simple harmonic motion as the shadow of circular motion; and aim a turret with atan, atan2, y-down screens and the degrees bug.

Added

How to use it

Trigonometry for every angle comes from one picture: a point P going round a circle of radius 1. Its x-coordinate is cos θ and its y-coordinate is sin θ. Each tab shows one consequence of that; angles can be typed in degrees or radians (150, 5pi/6, -30, 11pi/6) — choose the unit with the degrees / radians switch.

  • Unit circle — the “Spin the unit circle” lab: drag P (it snaps to 15°; untick to move freely) or press Spin. The quadrant is shaded, the reference angle α is drawn, and beside the circle sin θ and cos θ unwrap into waves as θ grows — past 360° and below 0° too. Pick sin, cos or tan to see the book’s reference-angle procedure step by step, with exact values (½, √2/2, √3/3, …) at the special angles. With tan, the tangent line x = 1 shows where the name comes from.

  • Solve sin x = k — every solution of sin x = k, cos x = k or tan x = k: on the circle (the two angles in one turn) and on the graph from −2π to 4π. The principal value a calculator returns is circled; the other solution comes from symmetry, and the general solution is written out.

  • Radians — an angle as arc length: the arc s = rθ, the sector area ½r²θ, one radian marked on the circle, conversions both ways, and the small-angle limit: sin θ/θ → 1 in radians but π/180 in degrees.

  • Sinusoids — build y = A sin(B(x − C)) + D (or with cos) and fit it to the book’s data with its procedure: daylight hours at 40° N, a harbour tide, or UK mains. A threshold shades where the curve is above a level — the tide window for a boat that needs 2.0 m of water.

  • Harmonic motion — a mass on a spring as the shadow of a point going round a circle: ω = √(k/m), the period and frequency, x(t) traced against time, and the pendulum’s T = 2π√(L/g).

  • atan2 turret — the “Rotate and aim” lab: a turret aims at a target you drag. Switch between atan(dy/dx) (which points the wrong way whenever dx < 0) and atan2(dy, dx); tick y points down to see screen coordinates turn positive angles clockwise; tick degrees bug to pass degrees to cos and sin. The code the turret runs is shown line by line.

Open an example from the book (above the tabs) loads any of the book’s worked examples.

⛶ Full screen (or F) gives the current tab’s circle or graph the whole screen — the browser’s full screen where it is allowed, otherwise a full-window layer (iPhone); a graph beside it grows to match, and everything is redrawn as the window changes. Escape leaves.

Limits

Values are double-precision decimals; exact values are shown for multiples of 30° and 45°. The sinusoid fit is the book’s procedure from a maximum, a minimum, the period and when the maximum occurs — not a least-squares fit to many points. The harmonic-motion animation runs in slow motion; the numbers are the real ones.

Related: Complex numbers, visually (Euler’s formula, where cos and sin become one exponential), Graphing calculator (plot any trig function, or polar curves r = f(θ)), Geometry (solve triangles), Fourier series (sums of sines), Algebra step by step (its Transformations tab slides a, b, h and k on sin x) and Physics.

Companion to the chapter Trigonometry of Mathematics, Reconnected.

Linking to an example

Share link copies a URL that reopens the tool as you have it. Links can also be written by hand with these parameters, followed by #tab to choose the tab (#circle, #solve, #radians, #waves, #shm, #aim). Settings a link leaves out take their defaults. A + in a link means plus (%2B works too); write a space as %20, or leave spaces out.

Parameter Meaning Example

t

the angle θ, in the unit given by unit; expressions allowed

t=140, t=11pi/6

unit

deg or rad

unit=rad

fn

sin, cos or tan (the function evaluated, or solved for)

fn=cos

k

the right-hand side of fn(x) = k

k=1/2, k=-0.222

r

radius for arc length and sector area

r=18

a, b, c, d

A, B, C, D of the sinusoid; expressions allowed

b=2pi/365

wave

sin or cos

wave=cos

data

daylight, tide, mains or none

data=tide

max, min, per, peak

the data: maximum, minimum, period, and where the maximum is

max=4.2&min=0.6&per=12.4&peak=3

xmax

right-hand end of the graph

xmax=24

h

a threshold to shade above (empty for none)

h=2

m, ks, amp, phi

mass (kg), spring constant (N/m), amplitude (m), phase (rad)

m=0.5&ks=200&amp=0.04

len

pendulum length (m)

len=1

aim

atan or atan2

aim=atan

ydown, degbug

true / false: screen coordinates; the degrees bug

ydown=true

tx, ty

the target, relative to the turret

tx=-2&ty=-1

example

a preset from the list below (opens its tab if the link has no #tab)

example=ch13-tide

Presets (?example=…):

Name Shows

ch13-unit-circle

the “Spin the unit circle” lab, at 140° (quadrant II)

ch13-sin150

sin 150° = +sin 30° = 1/2

ch13-cos240

cos 240° = −cos 60° = −1/2

ch13-tan-11pi6

tan(11π/6) = −tan 30° = −√3/3

ch13-sin765

sin 765° = sin 45° = √2/2 (two full turns)

ch13-sin-half

sin x = 1/2: x = π/6 and 5π/6, plus 2πn

ch13-cos-trap

cos x = −0.222: the inverse gives one answer, symmetry the other

ch13-radian

one radian: the arc as long as the radius

ch13-135deg

135° = 3π/4 ≈ 2.356 rad

ch13-pizza

a pizza slice: r = 18 cm, θ = π/4, crust 14.14 cm, area 127.2 cm²

ch13-small-angle

sin θ ≈ θ for small θ: sin θ/θ → 1 (in radians only)

ch13-sinusoid

y = 2 sin(2(x − π/4)): amplitude 2, period π, shift π/4

ch13-daylight

daylight at 40° N: H = 3 sin(2π/365 (t − 80.75)) + 12

ch13-tide

the harbour tide and the 2.0 m window over the bar (23:27 to 06:33)

ch13-mains

UK mains: 325 sin(100πt), period 20 ms

ch13-spring

0.5 kg on a 200 N/m spring, pulled 4 cm: ω = 20 rad/s, T = 0.314 s

ch13-atan-trap

the “Rotate and aim” lab: atan(dy/dx) points the turret the wrong way at (−2, −1)

ch13-atan2

atan2(dy, dx) gets (−2, −1) right: −153.43°

ch13-y-down

screen coordinates: y points down, so positive angles turn clockwise

ch13-degrees-bug

the degrees bug: degrees passed to cos and sin

ch15-arctan-trap

the argument of −1 − i: arctan(b/a) says 45°, the truth is −135°

Runs entirely in your browser; nothing you type leaves this page.