The magic of trigonometry