1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 06:08:31 +01:00
This commit is contained in:
Justin Lin 2022-05-05 21:28:14 +08:00
parent 748719d639
commit 582d7642eb

View File

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