const flowerArray = [2, 4, 6];
createCanvas(windowWidth, windowHeight);
colorMode(HSB, 360, 100, 100, 255);
flowerSize = max(width, height) * 0.1;
for (let i = 0; i < shapesNum; i++) {
shapes.push(new Shape());
for (let i = 0; i < shapes.length; i++) {
this.oxRandom = random(-width / 3, width / 3);
this.oyRandom = random(-height / 3, height / 3);
this.rMax = random(flowerSize * 0.25, flowerSize);
this.rCountStep = random(0.5, 1.5);
this.flowerNum = random(flowerArray);
for (let i = 0; i < 360; i++) {
this.r.push(this.rMax * abs(sin(i * this.flowerNum)));
this.c = random(1) > 0.5 ? color(random(360), 60, 90) : color(0);
this.rot = random(-360, 360);
this.rotStep = random(-2, 2);
this.nx = random(100000);
this.ny = random(100000);
this.ox = map(noise(this.nx), 0, 1, 0, width);
this.oy = map(noise(this.ny), 0, 1, 0, height);
this.rNow = this.rMax * sin(this.rCount);
for (let i = 0; i < 360; i++) {
this.r.push(this.rNow * abs(sin(i * this.flowerNum)));
this.rot += this.rotStep;
this.rCount += this.rCountStep;
translate(constrain(this.ox + this.oxRandom, 0, width), constrain(this.oy + this.oyRandom, 0, height));
for (let t = 0; t < 360; t++) {
let x = this.r[t] * cos(t);
let y = this.r[t] * sin(t);