mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-09-02 03:02:34 +02:00
add doc
This commit is contained in:
BIN
docs/images/lib2x-mz_hamiltonian-1.JPG
Normal file
BIN
docs/images/lib2x-mz_hamiltonian-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
BIN
docs/images/lib2x-mz_hamiltonian-2.JPG
Normal file
BIN
docs/images/lib2x-mz_hamiltonian-2.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 81 KiB |
29
docs/lib2x-mz_hamiltonian.md
Normal file
29
docs/lib2x-mz_hamiltonian.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# mz_hamiltonian
|
||||
|
||||
Creates a hamiltonian path from a maze. The path is the result of maze traversal using [Wall follower](https://en.wikipedia.org/wiki/Maze_solving_algorithm#Wall_follower).
|
||||
|
||||
**Since:** 2.5
|
||||
|
||||
## Parameters
|
||||
|
||||
- `rows` : The rows of a maze.
|
||||
- `columns` : The columns of a maze.
|
||||
- `start` : The start point to travel the maze. Default to `[0, 0]`.
|
||||
- `seed` : The maze is traveling randomly. Use `seed` to initialize the pseudorandom number generator.
|
||||
|
||||
## Examples
|
||||
|
||||
use <maze/mz_hamiltonian.scad>;
|
||||
use <hull_polyline2d.scad>;
|
||||
|
||||
rows = 5;
|
||||
columns = 10;
|
||||
|
||||
path = mz_hamiltonian(rows, columns, [0, 0]);
|
||||
hull_polyline2d(path, .5);
|
||||
|
||||

|
||||
|
||||
The [senbon_torii](https://github.com/JustinSDK/dotSCAD/blob/master/examples/maze/senbon_torii.scad) is based on `mz_hamiltonian`.
|
||||
|
||||

|
Reference in New Issue
Block a user