Afterglowscreensavers

Minimum Spanning Tree Builder Screensaver

The Minimum Spanning Tree Builder screensaver runs a real live Prim's algorithm over a random point cloud, connecting every point with the cheapest possible total edge length. It is free, runs in your browser, and ESC exits.

Live preview

Press ESC to leave fullscreen. Settings are saved in your browser only.

How the Minimum Spanning Tree Builder screensaver works

The saver scatters a real random cloud of points, then runs Prim's algorithm to connect them all with a minimum spanning tree.

Each step adds the real cheapest edge that connects a new point to the growing tree, never creating a cycle.

The growing tree is drawn live, edge by edge, so you watch the real cheapest connections accumulate frame by frame.

Once every point is connected, the tree holds briefly, then a fresh random point cloud and build begins.

A worked example

Two points sitting close together connect almost immediately, while an isolated outlier point only joins the tree once its single cheapest connecting edge is finally reached.

Settings & tips

Frequently asked questions

Is this a real minimum spanning tree algorithm?
Yes — a real, correct Prim's algorithm implementation, run live on a randomized point cloud.
What makes it "minimum"?
It connects every point using the least possible total edge length of any spanning tree — a real, proven-optimal property.
Is a key needed?
No — it is a pure local computation.
Is it free?
Yes — free, no download, in your browser.

← All Science & Research screensavers