A formula moves every point D of the pink circle to a new place E. As D runs around the circle, E draws the blue curve.
The source code is at github.com/KirillOsenkov/LiveGeometry. It is written in .NET and Avalonia.