Trigonometric functions and triangles