Advanced trigonometry