Connect the midpoints of the sides of any quadrilateral and you always get a parallelogram: opposite sides are equal and parallel, opposite angles are equal.
The source code is at github.com/KirillOsenkov/LiveGeometry. It is written in .NET and Avalonia.