mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 06:08:31 +01:00
rename
This commit is contained in:
parent
3c70c23afa
commit
bb59ba0939
@ -11,14 +11,14 @@ wall_thickness = 1.5;
|
|||||||
moutain_height = 30;
|
moutain_height = 30;
|
||||||
base_height = 3;
|
base_height = 3;
|
||||||
seed = 35;
|
seed = 35;
|
||||||
smoothness = 25;
|
smoothing = 25;
|
||||||
|
|
||||||
island_maze();
|
island_maze();
|
||||||
|
|
||||||
module island_maze() {
|
module island_maze() {
|
||||||
dirs = function(x, y, cells, seed)
|
dirs = function(x, y, cells, seed)
|
||||||
let(
|
let(
|
||||||
nz = nz_perlin2(x * cell_width / smoothness, y * cell_width / smoothness, seed),
|
nz = nz_perlin2(x * cell_width / smoothing, y * cell_width / smoothing, seed),
|
||||||
sd = y * len(cells[0]) + x + seed,
|
sd = y * len(cells[0]) + x + seed,
|
||||||
h = choose([[0, 2], [2, 0]], seed = sd),
|
h = choose([[0, 2], [2, 0]], seed = sd),
|
||||||
v = choose([[1, 3], [3, 1]], seed = sd)
|
v = choose([[1, 3], [3, 1]], seed = sd)
|
||||||
@ -33,8 +33,8 @@ module island_maze() {
|
|||||||
for(i = [0:len(wall) - 2]) {
|
for(i = [0:len(wall) - 2]) {
|
||||||
p1 = wall[i];
|
p1 = wall[i];
|
||||||
p2 = wall[i + 1];
|
p2 = wall[i + 1];
|
||||||
h1 = nz_perlin2(p1.x / smoothness , p1.y / smoothness , seed);
|
h1 = nz_perlin2(p1.x / smoothing , p1.y / smoothing , seed);
|
||||||
h2 = nz_perlin2(p2.x / smoothness , p2.y / smoothness , seed);
|
h2 = nz_perlin2(p2.x / smoothing , p2.y / smoothing , seed);
|
||||||
hull() {
|
hull() {
|
||||||
linear_extrude(h1 > 0 ? h1 * moutain_height + base_height : base_height)
|
linear_extrude(h1 > 0 ? h1 * moutain_height + base_height : base_height)
|
||||||
translate(p1)
|
translate(p1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user