Racked Billiard Balls

Source: evan.nixsys.bz/note

Stuart Langridge achieves almost identical effects with Javascript.