Docs Overview
Welcome
This is a beginner-to-intermediate trigonometry course written for software developers. Every concept pairs math notation with runnable code so you can see how trig shows up in graphics, games, data science, robotics, and web development.
Learning path
Work through the units in sidebar order. Each unit is a folder of lessons; each lesson ends with practice problems and runnable code.
- Unit 1: Foundations — what trig is, degrees vs radians, SOH-CAH-TOA.
- Unit 2: Circles & Triangles — the unit circle, special right triangles, Laws of Sines and Cosines.
- Unit 3: Functions & Identities — sine/cosine waves, core identities, inverse trig and
atan2. - Unit 4: Trig in Code — capstone recipes: rotations, oscillations, canvas/SVG, bug gallery, plus a live JS playground.
- Unit 5: Games & Graphics Projects — build a canvas clock, a projectile lab, and a mouse-aimed turret game.
- Unit 6: Waves, Sound & the Real World — Web Audio tones and beats, sine easing, map bearings and GPS distances.
Plus a standalone JS Playground — an interactive canvas + page runner. Every JavaScript snippet in the course has a Run in playground button that loads it there automatically.
How to read the math
Block formulas are rendered with KaTeX:
Inline symbols like \(\theta\), \(\sin\), \(\cos\) appear in text. If math does not render, make sure JavaScript is enabled (KaTeX runs client-side).
How to run the code
Python snippets assume Python 3 with only the standard library (math):
import math
print(math.sin(math.pi / 6)) # 0.5JavaScript snippets run in a browser console or Node.js. Remember: Math.sin, Math.cos, Math.tan all take radians, not degrees.
console.log(Math.sin(Math.PI / 6)); // 0.5
Try every snippet yourself. Change the angle, predict the output, then run it — that is the fastest way to build intuition.