2019-09-01 11:45:06 +08:00
|
|
|
include <line2d.scad>;
|
|
|
|
include <stereographic_extrude.scad>;
|
2019-09-01 18:20:04 +08:00
|
|
|
include <square_maze.scad>;
|
2019-09-01 11:45:06 +08:00
|
|
|
|
2019-09-01 20:20:08 +08:00
|
|
|
maze_rows = 10;
|
2019-09-01 11:45:06 +08:00
|
|
|
block_width = 40;
|
|
|
|
wall_thickness = 20;
|
|
|
|
fn = 24;
|
|
|
|
shadow = "YES"; // [YES, NO]
|
|
|
|
wall_height = 2;
|
|
|
|
|
|
|
|
module stereographic_projection_maze2(maze_rows, block_width, wall_thickness, fn, wall_height, shadow) {
|
|
|
|
maze_blocks = go_maze(
|
|
|
|
1, 1, // starting point
|
|
|
|
starting_maze(maze_rows, maze_rows),
|
|
|
|
maze_rows, maze_rows
|
|
|
|
);
|
|
|
|
|
|
|
|
length = block_width * maze_rows + wall_thickness;
|
|
|
|
|
|
|
|
module maze() {
|
2019-09-02 08:43:44 +08:00
|
|
|
translate([-block_width * maze_rows / 2, -block_width * maze_rows / 2, 0])
|
2019-09-03 17:37:52 +08:00
|
|
|
build_square_maze(
|
2019-09-01 11:45:06 +08:00
|
|
|
maze_rows,
|
|
|
|
maze_rows,
|
|
|
|
maze_blocks,
|
|
|
|
block_width,
|
|
|
|
wall_thickness
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
stereographic_extrude(shadow_side_leng = length, $fn = fn)
|
|
|
|
maze();
|
|
|
|
|
|
|
|
if(shadow == "YES") {
|
2019-09-02 08:43:44 +08:00
|
|
|
color("black")
|
2019-09-26 08:53:47 +08:00
|
|
|
linear_extrude(wall_height)
|
|
|
|
maze();
|
2019-09-01 11:45:06 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stereographic_projection_maze2(maze_rows, block_width, wall_thickness, fn, wall_height, shadow);
|