In a right triangle the square on the hypotenuse has the same area as the two squares on the legs together: a² + b² = c².
The source code is at github.com/KirillOsenkov/LiveGeometry. It is written in .NET and Avalonia.