Skip to content

Instantly share code, notes, and snippets.

@robinhouston
robinhouston / wilson.c
Last active September 7, 2023 03:28
Another method for generating “all RGB” images
// gcc -g -Wall --std=c99 wilson.c -lpng -o wilson && ./wilson
/* Generate a random spanning tree of the RGB cube, and a random
spanning tree of the pixel grid, using Wilson's algorithm, then
do a simultaneous breadth-first search of these trees to obtain
a bijection between the RGB cube and the pixel grid.
Inspired by allrgb.com.
-- Robin Houston, 2014-03
@robinhouston
robinhouston / Makefile
Last active May 14, 2018 12:15
How to make a map of the world with D3
all: world.topo.json libs
libs: d3.geo.projection.v0.min.js d3.v3.min.js topojson.v1.min.js
clean:
rm -f world.*.json ne_10m_admin_0_countries.* *.min.js
.PHONY: all clean libs
%.topo.json: %.geo.json
@robinhouston
robinhouston / README.md
Last active August 29, 2015 14:02
Black and white and red all over

Random noise at first, but leave it running for 5–10 minutes and it will slowly become more interesting.

Notionally a numerical solution of a system of differential equations, but the “checkerboard” solution is presumably an artefact of discretisation.

Suggested by Cornus Ammonis

@robinhouston
robinhouston / README.md
Last active August 29, 2015 14:02
Close-up of the chequered grid
@robinhouston
robinhouston / README.md
Last active August 29, 2015 14:02
Ammonis worms
@robinhouston
robinhouston / README.md
Last active August 29, 2015 14:02
Ammonis worms up close and personal
@robinhouston
robinhouston / README.md
Last active August 29, 2015 14:02
Worms 2

This is Cornus Ammonis’s new variant on the worms, from here. Click to magnify.

@robinhouston
robinhouston / README.md
Last active January 12, 2023 06:16
A reaction-diffusion simulation using WebGL

This is a Gray-Scott system, using parameters from Karl Sims: F=.0545, K=.062.

@robinhouston
robinhouston / README.md
Last active August 29, 2015 14:03
FitzHugh-Nagomo maze generator
@robinhouston
robinhouston / README.md
Created June 27, 2014 20:38
Interactive maze generator

Click and drag to seed.