1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-27 16:30:29 +02:00
This commit is contained in:
Justin Lin
2021-07-31 12:34:50 +08:00
parent 4bddf3ca33
commit 0295b0ded0
3 changed files with 6 additions and 15 deletions

View File

@@ -4,6 +4,7 @@ use <arc.scad>;
use <shear.scad>;
use <util/rand.scad>;
use <experimental/tile_w2e.scad>;
use <experimental/choose_children.scad>;
mask = [
[0, 1, 1, 0, 0, 0, 1, 1, 0],
@@ -25,16 +26,12 @@ random_city(rows, columns, mask);
module random_city(rows, columns, mask) {
tile_width = 30;
module select_child(n) {
children(n);
}
for(tile = tile_w2e([columns, rows], mask)) {
x = tile[0];
y = tile[1];
i = tile[2];
translate([x, y] * tile_width)
select_child(i) {
choose_children(i) {
tile00();
tile01();
tile02();