mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-31 02:10:28 +02:00
format
This commit is contained in:
@@ -18,17 +18,15 @@ module noisy_circle_maze(r_cells, cell_width, wall_thickness, origin_offset, noi
|
||||
noisy_f = is_undef(noisy_factor) ? 1 : noisy_factor;
|
||||
half_wall_thickness = wall_thickness / 2;
|
||||
seed = rand(0, 256);
|
||||
for(wall = walls) {
|
||||
for(i = [0:len(wall) - 2]) {
|
||||
p0 = ptf_circle(rect_size, wall[i]);
|
||||
p1 = ptf_circle(rect_size, wall[i + 1]);
|
||||
pn00 = nz_perlin2(p0[0], p0[1], seed) * noisy_f;
|
||||
pn01 = nz_perlin2(p0[0] + seed, p0[1] + seed, seed) * noisy_f;
|
||||
pn10 = nz_perlin2(p1[0], p1[1], seed) * noisy_f;
|
||||
pn11 = nz_perlin2(p1[0] + seed, p1[1] + seed, seed) * noisy_f;
|
||||
polyline_join([p0 + [pn00, pn01], p1 + [pn10, pn11]])
|
||||
circle(half_wall_thickness);
|
||||
}
|
||||
for(wall = walls, i = [0:len(wall) - 2]) {
|
||||
p0 = ptf_circle(rect_size, wall[i]);
|
||||
p1 = ptf_circle(rect_size, wall[i + 1]);
|
||||
pn00 = nz_perlin2(p0[0], p0[1], seed) * noisy_f;
|
||||
pn01 = nz_perlin2(p0[0] + seed, p0[1] + seed, seed) * noisy_f;
|
||||
pn10 = nz_perlin2(p1[0], p1[1], seed) * noisy_f;
|
||||
pn11 = nz_perlin2(p1[0] + seed, p1[1] + seed, seed) * noisy_f;
|
||||
polyline_join([p0 + [pn00, pn01], p1 + [pn10, pn11]])
|
||||
circle(half_wall_thickness);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user