Start with a right triangle whose two short sides are both 1. Its long side is √2. Now build a new right triangle on that long side, with the other short side 1 again: its long side is √3. Keep going.
The source code is at github.com/KirillOsenkov/LiveGeometry. It is written in .NET and Avalonia.
Also here: Catriona Agg's geometry puzzles and puzzles from Geometry Snacks made interactive; the same gallery in plain JavaScript; and how to embed a live drawing in your own page.