1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-04-14 11:11:55 +02:00
This commit is contained in:
Justin Lin 2021-09-07 10:21:24 +08:00
parent 69e2a79488
commit fd375dd50f
4 changed files with 9 additions and 9 deletions

View File

@ -2,7 +2,7 @@ use <experimental/tri_subdivide.scad>;
function _prj2sphere(t, r) = [for(p = t) p / norm(p) * r];
function geom_isosphere(radius, detail = 0) =
function geom_icosahedron(radius, detail = 0) =
let(
t = (1 + sqrt(5)) / 2 ,
icosahedron_points = [

View File

@ -0,0 +1,6 @@
use <experimental/geom_icosahedron.scad>;
module icosahedron(radius, detail = 0) {
points_faces = geom_icosahedron(radius, detail);
polyhedron(points_faces[0], points_faces[1]);
}

View File

@ -1,6 +0,0 @@
use <experimental/geom_isosphere.scad>;
module isosphere(radius, detail = 0) {
points_faces = geom_isosphere(radius, detail);
polyhedron(points_faces[0], points_faces[1]);
}

View File

@ -1,6 +1,6 @@
use <util/rand.scad>;
use <noise/nz_worley3s.scad>;
use <experimental/geom_isosphere.scad>;
use <experimental/geom_icosahedron.scad>;
radius = 30;
detail = 3;
@ -12,7 +12,7 @@ worley_sphere(radius, detail, amplitude);
module worley_sphere(radius, detail, amplitude, dist = "border", grid_w = undef, seed = undef) {
gw = is_undef(grid_w) ? radius : grid_w;
points_faces = geom_isosphere(radius, detail);
points_faces = geom_icosahedron(radius, detail);
points = points_faces[0];
faces = points_faces[1];