1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-13 18:24:28 +02:00
This commit is contained in:
Justin Lin
2022-03-17 17:03:20 +08:00
parent 637dcf0840
commit 3e110a045b

View File

@@ -32,12 +32,10 @@ function mz_hamiltonian(rows, columns, start = [0, 0], init_cells, seed) =
each if(type == "TOP_WALL") _mz_hamiltonian_top(cell.x, cell.y) else each if(type == "TOP_WALL") _mz_hamiltonian_top(cell.x, cell.y) else
if(type == "RIGHT_WALL") _mz_hamiltonian_right(cell.x, cell.y) else if(type == "RIGHT_WALL") _mz_hamiltonian_right(cell.x, cell.y) else
if(type == "TOP_RIGHT_WALL" || type == "MASK") _mz_hamiltonian_top_right(cell.x, cell.y) if(type == "TOP_RIGHT_WALL" || type == "MASK") _mz_hamiltonian_top_right(cell.x, cell.y)
], ],
[for(x = [0:c * 2 - 1]) [x, 0]], [for(x = [0:c * 2 - 1]) [x, 0]],
[for(y = [0:r * 2 - 1]) [0, y]] [for(y = [0:r * 2 - 1]) [0, y]]
), ),
dot_pts = dedup(sort(all, by = "vt")), dot_pts = dedup(sort(all, by = "vt"))
_ = echo(dot_pts)
) )
_mz_hamiltonian_travel(dot_pts, start * 2, r * c * 4); _mz_hamiltonian_travel(dot_pts, start * 2, r * c * 4);