From 4a9d9350591e1bb1c9e21b1929f30a9cfafb4d64 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Thu, 18 Aug 2022 15:30:45 +0800 Subject: [PATCH] noise lower rock --- examples/maze/giant_maze.scad | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/maze/giant_maze.scad b/examples/maze/giant_maze.scad index 55b980c1..3f75ed02 100644 --- a/examples/maze/giant_maze.scad +++ b/examples/maze/giant_maze.scad @@ -58,11 +58,10 @@ module giant_maze() { for(cell = cells) { cell_pt = cell[0]; cell_poly = cell[1]; - - noise = 2 * nz_perlin2(cell_pt.x / height_smooth, cell_pt.y / height_smooth, seed) + height; b = m[cell_pt[1]][cell_pt[0]]; if(!is_undef(b) && b == 1) { + noise = 2 * nz_perlin2(cell_pt.x / height_smooth, cell_pt.y / height_smooth, seed) + height; color("LightGrey") translate(cell_pt) linear_extrude(noise, scale = 0.9) @@ -70,9 +69,10 @@ module giant_maze() { polygon(cell_poly); } else { + noise = nz_perlin2(cell_pt.x / height_smooth / 2, cell_pt.y / height_smooth / 2, seed + 1) + height / 2; color("gray") translate(cell_pt) - linear_extrude(height / 2, scale = 0.75) + linear_extrude(noise, scale = 0.75) translate(-cell_pt) polygon(cell_poly); }