Here's an implementation of a random spanning tree where the nodes are coordinates on a plane so one can render them later: https://gist.github.com/teh/5526976 ~