1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 04:51:26 +02:00

add mz_square

This commit is contained in:
Justin Lin
2022-03-27 11:34:18 +08:00
parent 5595170b09
commit 3f7478710f

28
src/maze/mz_square.scad Normal file
View File

@@ -0,0 +1,28 @@
/**
* mz_square.scad
*
* @copyright Justin Lin, 2020
* @license https://opensource.org/licenses/lgpl-3.0.html
*
* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-mz_square.html
*
**/
use <_impl/_mz_square_cells_impl.scad>;
use <mz_square_initialize.scad>;
function mz_square(rows, columns, start = [0, 0], init_cells, x_wrapping = false, y_wrapping = false, seed) =
let(
init_undef = is_undef(init_cells),
mz = init_undef ? mz_square_initialize(rows, columns) : init_cells
)
go_maze(
start.x,
start.y,
mz,
len(mz),
len(mz[0]),
x_wrapping,
y_wrapping,
seed
);