From 844a061ee23934438014fae4729d60932e2e7e3a Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Thu, 25 May 2017 17:40:22 +0800 Subject: [PATCH] we don't need to repeat the first one --- src/shape_superformula.scad | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/shape_superformula.scad b/src/shape_superformula.scad index fca81e78..f8afb5fa 100644 --- a/src/shape_superformula.scad +++ b/src/shape_superformula.scad @@ -23,16 +23,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) = - let( - pts = [ - for(phi = [0:phi_step: 6.28318]) - let( - angle = __to_degree(phi), - r = _superformula_r(angle, m1, m2, n1, n2, n3, a, b) - - ) - __ra_to_xy(r, angle) - ], - shape_pts = concat(pts, [pts[0]]) - - ) shape_pts; \ No newline at end of file + [ + for(phi = [0:phi_step:6.28318]) + let( + angle = __to_degree(phi), + r = _superformula_r(angle, m1, m2, n1, n2, n3, a, b) + + ) + __ra_to_xy(r, angle) + ]; \ No newline at end of file