Another way to turn an equilateral triangle into a square, with five pieces and three moves. Drag the slider. First the top of the triangle splits in two, and the halves swing down on hinges into the corners: the triangle is now a rectangle, twice as wide as it is tall.
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.