1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-10 00:36:40 +02:00
This commit is contained in:
Justin Lin
2022-03-15 20:49:29 +08:00
parent 65116cbc78
commit f5e403bbf0

View File

@@ -26,12 +26,11 @@ function mz_hamiltonian(rows, columns, start = [0, 0], seed) =
let(
x = mz_square_get(cell, "x"),
y = mz_square_get(cell, "y"),
type = mz_square_get(cell, "t"),
pts = type == "TOP_WALL" ? _mz_hamiltonian_top(x, y) :
type == "RIGHT_WALL" ? _mz_hamiltonian_right(x, y) :
type == "TOP_RIGHT_WALL" ? _mz_hamiltonian_top_right(x, y) : []
type = mz_square_get(cell, "t")
)
each pts
each if(type == "TOP_WALL") _mz_hamiltonian_top(x, y) else
if(type == "RIGHT_WALL") _mz_hamiltonian_right(x, y) else
if(type == "TOP_RIGHT_WALL") _mz_hamiltonian_top_right(x, y)
],
[for(x = [0:columns * 2 - 1]) [x, 0]],
[for(y = [0:rows * 2 - 1]) [0, y]]