1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 17:24:20 +02:00
This commit is contained in:
Justin Lin
2020-02-16 16:40:43 +08:00
parent f549a07981
commit 0bb4fa6485

View File

@@ -1,5 +1,6 @@
use <stereographic_extrude.scad>; use <stereographic_extrude.scad>;
use <square_maze.scad>; use <experimental/mz_blocks.scad>;
use <experimental/mz_walls.scad>;
maze_rows = 10; maze_rows = 10;
block_width = 40; block_width = 40;
@@ -9,23 +10,25 @@ shadow = "YES"; // [YES, NO]
wall_height = 2; wall_height = 2;
module stereographic_projection_maze2(maze_rows, block_width, wall_thickness, fn, wall_height, shadow) { module stereographic_projection_maze2(maze_rows, block_width, wall_thickness, fn, wall_height, shadow) {
maze_blocks = go_maze( blocks = mz_blocks(
1, 1, // starting point [1, 1],
starting_maze(maze_rows, maze_rows),
maze_rows, maze_rows maze_rows, maze_rows
); );
walls = mz_walls(blocks, maze_rows, maze_rows, block_width);
length = block_width * maze_rows + wall_thickness; length = block_width * maze_rows + wall_thickness;
module maze() { module maze() {
translate([-block_width * maze_rows / 2, -block_width * maze_rows / 2, 0]) translate([-block_width * maze_rows / 2, -block_width * maze_rows / 2, 0])
build_square_maze( for(wall = walls) {
maze_rows, for(i = [0:len(wall) - 2]) {
maze_rows, hull() {
maze_blocks, translate(wall[i]) square(wall_thickness, center = true);
block_width, translate(wall[i + 1]) square(wall_thickness, center = true);
wall_thickness }
); }
}
} }
stereographic_extrude(shadow_side_leng = length, $fn = fn) stereographic_extrude(shadow_side_leng = length, $fn = fn)