1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
This commit is contained in:
Justin Lin 2021-03-12 09:30:11 +08:00
parent 39c79cd4d8
commit 1de4d08a7c
4 changed files with 9 additions and 8 deletions

View File

@ -1,4 +1,4 @@
use <experimental/2_edge_wang_tiles.scad>;
use <experimental/tiles_wang_2e.scad>;
use <arc.scad>;
rows = 10;
@ -7,7 +7,7 @@ tile_width = 10;
tile_thickness = 2;
$fn = 24;
2_edge_wang_tiles(rows, columns, tile_width) {
tiles_wang_2e(rows, columns, tile_width) {
sample_tile(0, tile_width, tile_thickness);
sample_tile(1, tile_width, tile_thickness);
sample_tile(2, tile_width, tile_thickness);
@ -33,7 +33,7 @@ translate([0, tile_width * (rows + 1)]) {
color("green")
linear_extrude(tile_thickness)
2_edge_wang_tiles(rows, columns, tile_width) {
tiles_wang_2e(rows, columns, tile_width) {
path_tile(0, tile_width);
path_tile(1, tile_width);
path_tile(2, tile_width);

View File

@ -3,7 +3,7 @@ use <shape_trapezium.scad>;
use <arc.scad>;
use <shear.scad>;
use <util/rand.scad>;
use <experimental/2_edge_wang_tiles.scad>;
use <experimental/tiles_wang_2e.scad>;
mask = [
[0, 1, 1, 0, 0, 0, 1, 1, 0],
@ -24,7 +24,7 @@ random_city(rows, columns, mask);
module random_city(rows, columns, mask) {
tile_width = 30;
2_edge_wang_tiles(rows, columns, tile_width, mask) {
tiles_wang_2e(rows, columns, tile_width, mask) {
tile00();
tile01();
tile02();

View File

@ -1,4 +1,4 @@
use <experimental/2_edge_wang_tiles.scad>;
use <experimental/tiles_wang_2e.scad>;
use <box_extrude.scad>;
rows = 8;
@ -14,7 +14,7 @@ module tube_box(rows, columns, tile_width) {
eighth_w = tile_width / 8;
translate([eighth_w, eighth_w, -eighth_w])
2_edge_wang_tiles(rows, columns, tile_width) {
tiles_wang_2e(rows, columns, tile_width) {
tube_tile(0, tile_width);
tube_tile(1, tile_width);
tube_tile(2, tile_width);

View File

@ -1,4 +1,5 @@
module 2_edge_wang_tiles(rows, columns, tile_width, mask, seed) {
// wang tiles - 2 edges
module tiles_wang_2e(rows, columns, tile_width, mask, seed) {
edges = is_undef(seed) ? [
for(y = [0:rows])
[