xxxxxxxxxx
38
let n=0.0;
function setup() {
createCanvas(800, 800);
angleMode(DEGREES);
noFill();
strokeWeight(10);
}
function draw() {
background(0);
push();
//translate(100, 100)
rotate(0)
stroke(127, 64, 250);
waves(25, 50, 100);
pop();
push();
stroke(127, 255, 64)
translate(800, 800);
rotate(180)
waves(25, 50, 500);
pop();
n+=0.05
}
function waves(count, scale, seed) {
for (let i=1; i<count; i++) {
beginShape();
for (let j=225; j<=585; j+=13) {
let x = cos(j) * scale * i;
let y = sin(j) * scale * i;
x += (noise(seed + n + x/1000)-0.5) * scale * 5
y += (noise(seed + n + y/1000)-0.5) * scale * 5
curveVertex(x,y)
}
endShape()
}
}