Home▸Networks & Graph Theory▸Network Resilience (2D)

Network Resilience (2D)

A flat-canvas companion to the 3D Network Resilience lab: build a Barabási–Albert scale-free graph or an Erdős–Rényi random graph, then attack it node by node — targeting the highest-degree hub each time, or picking victims at random — and watch the giant component either survive or collapse.

Networks & Graph Theory2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-network-resilience ↗ Open standalone

This 2D companion runs the same graph-percolation mechanic as the 3D version on a plain canvas: a Barabási–Albert scale-free network is grown by preferential attachment, or an Erdős–Rényi random graph is generated with uniform edge probability, and a force-directed layout keeps the drawing readable as nodes are removed. Each removal — hub-first in targeted mode, uniformly random otherwise — triggers a breadth-first search that recomputes connected components, so the giant-component size and a live mini history chart update after every step, making the "robust yet fragile" asymmetry of scale-free networks directly visible.

⚙ Under the hood

2D canvas percolation lab: Barabási–Albert scale-free and Erdős–Rényi random graphs, targeted-hub vs random node removal, and a BFS-recomputed giant component after every step.

barabási–albertscale-free networkshub attackgiant componentpercolationerdős–rényi

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)