mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-28 08:50:30 +02:00
add seed param
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
module 2_edge_wang_tiles(rows, columns, tile_width) {
|
||||
edges = [
|
||||
module 2_edge_wang_tiles(rows, columns, tile_width, seed) {
|
||||
edges = is_undef(seed) ? [
|
||||
for(y = [0:rows])
|
||||
[
|
||||
for(x = [0:columns])
|
||||
[round(rands(0, 1, 1)[0]), round(rands(0, 1, 1)[0])]
|
||||
let(rs = rands(0, 1, 2))
|
||||
[round(rs[0]), round(rs[1])]
|
||||
]
|
||||
] : [
|
||||
for(y = [0:rows])
|
||||
[
|
||||
for(x = [0:columns])
|
||||
let(rs = rands(0, 1, 2, 10 + y * columns + x))
|
||||
[round(rs[0]), round(rs[1])]
|
||||
]
|
||||
];
|
||||
|
||||
|
Reference in New Issue
Block a user