Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/phrb/3d-spanning-tree

Python script for generating 3d spanning trees.
https://github.com/phrb/3d-spanning-tree

Last synced: 18 days ago
JSON representation

Python script for generating 3d spanning trees.

Awesome Lists containing this project

README

        

Spanning Trees in a Cube
------

This python script generates a tree that tries to reach
every node of a cube exactly once, i.e., makes a 3d maze.

The tree obey certain rules, or "walking modes", defined
by functions in the script:

Random Walk: Chooses a new direction for each point,
with no other heuristic than the random number generator.

Weighted Walk: Has a propension to favor a point's previous
direction in new extensions.

Depth Walk: Extends in a single direction until it finds
an occupied cell or the end of the cube.

Shell Walk: Extends until it can, then change direction and
continue extending, making same-colored paths that span the
"shell" of the cube.

Usage:

$ python span_tree.py [ ]

![walks](https://github.com/phrb/3d-spanning-tree/raw/master/Walks.png)