1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 04:51:26 +02:00

noise lower rock

This commit is contained in:
Justin Lin
2022-08-18 15:30:45 +08:00
parent f587ffecd0
commit 4a9d935059

View File

@@ -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);
}