A small wheel rolls around the inside of a big ring. A pen is stuck through a hole in the small wheel, and the red curve is what it draws as the wheel goes round and round.
The source code is at github.com/KirillOsenkov/LiveGeometry. It is written in .NET and Avalonia.