1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 13:01:37 +02:00

add radius param

This commit is contained in:
Justin Lin
2020-10-25 16:46:20 +08:00
parent 4f7de83ff0
commit d8dfd241dd

View File

@@ -1,4 +1,4 @@
function fibonacci_sphere(n, dir = "CT_CLK") =
function fibonacci_sphere(n, radius, dir = "CT_CLK") =
let(
toDegrees = 180 / PI,
phi = PI * (3 - sqrt(5)),
@@ -13,5 +13,5 @@ function fibonacci_sphere(n, dir = "CT_CLK") =
x = cos(theta * toDegrees) * r,
y = sin(theta * toDegrees) * r
)
[x, y, z]
[x, y, z] * radius
];