https://github.com/phrb/3d-spanning-tree
Python script for generating 3d spanning trees.
https://github.com/phrb/3d-spanning-tree
Last synced: 8 months ago
JSON representation
Python script for generating 3d spanning trees.
- Host: GitHub
- URL: https://github.com/phrb/3d-spanning-tree
- Owner: phrb
- Created: 2014-07-17T02:35:48.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-10-01T01:38:29.000Z (about 9 years ago)
- Last Synced: 2025-02-02T14:48:59.584Z (10 months ago)
- Language: Python
- Size: 701 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 [ ]
