1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 22:28:16 +01:00
This commit is contained in:
Justin Lin 2022-03-12 11:48:03 +08:00
parent 79f9a76087
commit 95edbbee76
2 changed files with 2 additions and 6 deletions

View File

@ -2,11 +2,7 @@ use <../__comm__/__ra_to_xy.scad>;
use <../__comm__/__to_degree.scad>;
function _superformula_r(angle, m1, m2, n1, n2 = 1, n3 = 1, a = 1, b = 1) =
pow(
pow(abs(cos(m1 * angle / 4) / a), n2) +
pow(abs(sin(m2 * angle / 4) / b), n3),
- 1 / n1
);
(abs(cos(m1 * angle / 4) / a) ^ n2 + abs(sin(m2 * angle / 4) / b) ^ n3) ^ (- 1 / n1);
function _shape_superformula_impl(phi_step, m1, m2, n1, n2 = 1, n3 = 1, a = 1, b = 1) =
let(tau = PI * 2)

View File

@ -71,7 +71,7 @@ module vrn2_space(size, grid_w, seed, spacing = 1, r = 0, delta = 0, chamfer = f
),
p = nbrs[4],
points = concat(
[for(i = [0:3]) nbrs[i]],
[nbrs[0], nbrs[1], nbrs[2], nbrs[3]],
[for(i = [5:len(nbrs) - 1]) nbrs[i]]
)
)