mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 17:24:20 +02:00
c-style for loop
This commit is contained in:
@@ -19,12 +19,12 @@ function _superformula_r(angle, m1, m2, n1, n2 = 1, n3 = 1, a = 1, b = 1) =
|
|||||||
);
|
);
|
||||||
|
|
||||||
function shape_superformula(phi_step, m1, m2, n1, n2 = 1, n3 = 1, a = 1, b = 1) =
|
function shape_superformula(phi_step, m1, m2, n1, n2 = 1, n3 = 1, a = 1, b = 1) =
|
||||||
|
let(tau = PI * 2)
|
||||||
[
|
[
|
||||||
for(phi = [0:phi_step:PI * 2])
|
for(phi = 0; phi <= tau; phi = phi + phi_step)
|
||||||
let(
|
let(
|
||||||
angle = __to_degree(phi),
|
angle = __to_degree(phi),
|
||||||
r = _superformula_r(angle, m1, m2, n1, n2, n3, a, b)
|
r = _superformula_r(angle, m1, m2, n1, n2, n3, a, b)
|
||||||
|
|
||||||
)
|
)
|
||||||
__ra_to_xy(r, angle)
|
__ra_to_xy(r, angle)
|
||||||
];
|
];
|
Reference in New Issue
Block a user