Seven rods, pinned together. The two short ones at the left are nailed to the board at their left ends; drag the left nail to move the whole machine. Drag the yellow joint along its arc and watch the green pen: it draws a perfectly straight line, though nothing in the machine moves straight.
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.