Let $P$ be the set of points in the plane, and let $f : P \to P$ be a function such that the image through $f$ of any triangle is a square (any polygon is considered to be formed by the reunion of the points on its sides). Prove that $f(P)$ is a square.