jamiegibney / trig_visuals

Common trigonometric function visuals

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trigonometric function visualisation

screencast.mp4

A simple visualisation of common trigonometric functions on a unit circle.

Made using the nannou library for Rust. Inspired by this video.

Visualised functions

$\mathrm{sin}\ θ = \frac{O}{H}$

$\mathrm{cos}\ θ = \frac{A}{H}$

$\mathrm{tan}\ θ = \frac{O}{A}$

$\mathrm{cot}\ θ = \frac{A}{O} = \frac{1}{\mathrm{tan}\ θ}$

$\mathrm{sec}\ θ = \frac{H}{A} = \frac{1}{\mathrm{cos}\ θ}$

$\mathrm{csc}\ θ = \frac{H}{O} = \frac{1}{\mathrm{sin}\ θ}$


$A = \mathrm{Adjacent\ side}$

$O = \mathrm{Opposite\ side}$

$H = \mathrm{Hypotenuse}$

$θ = \mathrm{Theta\ (current\ angle\ in\ radians)}$

Keymap

  • Space → toggle motion
  • L → toggle labels (attached to coloured lines)
  • V → toggle right-hand side values
  • T → toggle visual of theta $θ$
  • R → reset theta $θ$
  • S → reset motion rate
  • = → increase circle scale
  • - → decrease circle scale
  • 0 → reset circle scale
  • Up → increase motion rate
  • Down → decrease motion rate

About

Common trigonometric function visuals


Languages

Language:Rust 100.0%