Python script for generating 3d spanning trees.