Trigonometric identities and triangles