xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
blendMode(BLEND);
background(245);
//noStroke();
blendMode(MULTIPLY);
noStroke();
translate(width/2,height/2);
fill(0,150,240);
drawLiq(18,50,20,100);
fill(240,240,0);
drawLiq(15,60,25,120);
fill(240,0,240);
drawLiq(12,45,15,150);
}
function drawLiq(vNnum,nm,sm,fcm){
push();
rotate(frameCount/fcm);
let dr = TWO_PI/vNnum;
beginShape();
for(let i = 0; i < vNnum + 3; i++){
let ind = i%vNnum;
let rad = dr *ind;
let r = height*0.3 + noise(frameCount/nm + ind) * height*0.1 + sin(frameCount/sm + ind)*height*0.05;
curveVertex(cos(rad)*r, sin(rad)*r);
}
endShape();
pop();
}