Skip to content

hrb90/slick-mongoose

Repository files navigation

slick-mongoose

A visualization of Carsten Thomassen's proof of the 5-color theorem for planar graphs. See it in action here.

Contributing

The sidebar text explaining what's going on in the visualization lives in explanation.ts; pull requests to improve the explanatory text are encouraged!

The code in the other files is not terribly well-documented, but if you want to play around, all you need is

npm install && npm test.

npm run mutate will use Stryker to run some mutation tests.

What's where

geom.ts implements some basic computational geometry primitives.

planar_graph.ts contains an implementation of a doubly-connected edge list. The implementation represents the data as a "dumb" JavaScript object for easy immutability.

animation.ts contains datatypes and functions for constructing and reading a list-based description of the steps of our animation.

Thomassen's algorithm is implemented in thomassen.ts, which exports a single fiveColor method.

Acknowledgements

Thanks to Tom Hull for introducing me to this lovely proof; Yaanik Desai for the repository name; Nico Jansen for help configuring the mutation testing framework; and Abhi Bassi for design help. This site contains additional design elements from Read Only by HTML5Up.