Line of Best Fit

Twelve points that lie roughly along a line, like measurements from an experiment. The blue line fits them best: of all the lines you could draw, it makes the red squares, one on each point's gap to the line, as small as possible in total area.

The source code is at github.com/KirillOsenkov/LiveGeometry. It is written in .NET and Avalonia.

Loading Live Geometry…