mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 14:18:13 +01:00
update doc
This commit is contained in:
parent
c93d1ae897
commit
97860fdf67
Binary file not shown.
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 67 KiB |
@ -1,6 +1,6 @@
|
|||||||
# fibonacci_lattice
|
# fibonacci_lattice
|
||||||
|
|
||||||
Creates visually even spacing of n points on the surface of the sphere. Nearest-neighbor points will all be approximately the same distance apart. There're 8 spirals on the sphere.
|
Creates visually even spacing of n points on the surface of the sphere. Nearest-neighbor points will all be approximately the same distance apart. There're max 21 spirals on the sphere.
|
||||||
|
|
||||||
(It's called "visually even spacing" because only the vertices of the 5 [Platonic solids](https://en.wikipedia.org/wiki/Platonic_solid) can be said to be truly evenly spaced around the surface of a sphere.)
|
(It's called "visually even spacing" because only the vertices of the 5 [Platonic solids](https://en.wikipedia.org/wiki/Platonic_solid) can be said to be truly evenly spaced around the surface of a sphere.)
|
||||||
|
|
||||||
@ -30,9 +30,6 @@ Creates visually even spacing of n points on the surface of the sphere. Nearest-
|
|||||||
|
|
||||||
![fibonacci_lattice](images/lib3x-fibonacci_lattice-1.JPG)
|
![fibonacci_lattice](images/lib3x-fibonacci_lattice-1.JPG)
|
||||||
|
|
||||||
use <fibonacci_lattice.scad>
|
|
||||||
use <polyline_join.scad>
|
|
||||||
|
|
||||||
n = 200;
|
n = 200;
|
||||||
radius = 20;
|
radius = 20;
|
||||||
pts = fibonacci_lattice(n, radius);
|
pts = fibonacci_lattice(n, radius);
|
||||||
@ -42,15 +39,16 @@ Creates visually even spacing of n points on the surface of the sphere. Nearest-
|
|||||||
sphere(1);
|
sphere(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
sphere(radius);
|
sphere(radius * 0.9);
|
||||||
|
|
||||||
spirals = [for(j = [0:7])
|
spirals = [for(j = [0:20])
|
||||||
[for(i = j; i < len(pts); i = i + 8) pts[i]]
|
[for(i = j; i < len(pts); i = i + 21) pts[i]]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
for(spiral = spirals) {
|
for(spiral = spirals) {
|
||||||
polyline_join(spiral)
|
polyline_join(spiral)
|
||||||
sphere(.5);
|
sphere(.25);
|
||||||
}
|
}
|
||||||
|
|
||||||
![fibonacci_lattice](images/lib3x-fibonacci_lattice-2.JPG)
|
![fibonacci_lattice](images/lib3x-fibonacci_lattice-2.JPG)
|
Loading…
x
Reference in New Issue
Block a user