mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 06:08:31 +01:00
refactor
This commit is contained in:
parent
748719d639
commit
582d7642eb
@ -13,8 +13,10 @@ module worley_sphere(radius, detail, amplitude, dist = "border", grid_w = undef,
|
||||
gw = is_undef(grid_w) ? radius : grid_w;
|
||||
points_faces = geom_icosahedron(1, detail);
|
||||
sd = is_undef(seed) ? rand() : seed;
|
||||
points = points_faces[0];
|
||||
noises = _nz_worley3s(points * radius, sd, gw, dist);
|
||||
polyhedron(
|
||||
[for(p = points_faces[0]) p * (radius + _nz_worley3(p * radius, sd, gw, dist)[3] * amplitude)],
|
||||
[for(i = [0:len(points) - 1]) points[i] * (radius + noises[i][3] * amplitude)],
|
||||
points_faces[1]
|
||||
);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user