In square ABCD mark points E, F, G and H at the same distance from the corners: AE = BF = CG = DH. EFGH is a square too, and the four corner triangles are congruent right triangles. This picture is the heart of a famous proof of the Pythagorean theorem.
The source code is at github.com/KirillOsenkov/LiveGeometry. It is written in .NET and Avalonia.