From fc2d9a9353cabbc5d082989ed225af4391dacffb Mon Sep 17 00:00:00 2001 From: Lev Date: Fri, 16 Jul 2021 00:32:38 -0500 Subject: [PATCH] Update value --- .../Topic 8/8.1.8 Maurer Roses/sketch.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CM2030 Graphics Programming/Topic 8/8.1.8 Maurer Roses/sketch.js b/CM2030 Graphics Programming/Topic 8/8.1.8 Maurer Roses/sketch.js index c80ca8e..d39532b 100644 --- a/CM2030 Graphics Programming/Topic 8/8.1.8 Maurer Roses/sketch.js +++ b/CM2030 Graphics Programming/Topic 8/8.1.8 Maurer Roses/sketch.js @@ -1,5 +1,5 @@ -let d = 8 -let n = 5; +let n = 6; +let d = 71; let sliderk; function setup() @@ -19,11 +19,12 @@ function draw() noFill(); beginShape(); - for(let a = 0; a < 360; a++) + for(let i = 0; i <= 360; i++) { - let r = 150; - let x = r * cos(a); - let y = r * sin(a); + let k = i * d; + let r = 200 * sin(n*k); + let x = r * cos(k); + let y = r * sin(k); vertex(x, y); } endShape(CLOSE);