xxxxxxxxxx
47
let ang = 0;
function setup() {
createCanvas(1200, 500);
// background('#4E73B6');
// strokeWeight(0.5);
// stroke(200);
// fill(255);
noFill();
angleMode(DEGREES);
}
function draw() {
background(100,10);
push();
fill(255);
noStroke();
rect(5,5,width-10,height-10);
translate(width / 8, height / 2);
bonito(80, 50, 150, 300);
bonito(430, 300, 100, 150);
bonito(830, 50, 300, 150);
noLoop();
}
function bonito(x, r, g, b) {
strokeWeight(0.5);
stroke(200);
for (let i = 1; i < 100; i += 5) {
beginShape();
rotate(ang);
if (random() > 0.2) {
fill(r, random(g - 100, g), random(b - 100, b), random(150));
} else {
noFill();
}
curveVertex(x, 0);
curveVertex(
x + i * round(random(-1, 1)),
i * ang * 130 * round(random(-1, 1))
);
curveVertex(x + i * ang, ang + random(-200, 200));
endShape(CLOSE);
}
}