xxxxxxxxxx
let c = ['#ff6666',' #ccff66', '#5d2e8c', '#2ec4b6', '#f1e8b8'];
// https://coolors.co/ff6666-ccff66-5d2e8c-2ec4b6-f1e8b8
function setup() {
createCanvas(windowWidth, windowHeight);
// colorMode(HSB,360,100,100,100);
background('#ffd23f');
// noStroke();
}
function draw() {
// 参考:https://note.com/deconbatch/n/nc14219bfacc6?magazine_key=m5512019b8626 (deconbatch)
let xInit = width * 0.5;
let yInit = height * 0.5;
let rDiv = width * 0.2;
// background(0.0, 0.0, 90.0, 100.0);
background(random(255),30);
for (let rBase = width * 0.05; rBase < width * 0.35; rBase += width * 0.01) {
fill(rBase % 360.0, 60.0, 60.0, 100.0);
for (let radian = 0.0; radian < TWO_PI; radian += 0.005) {
let pN = noise(xInit + rBase * cos(radian) * 0.02, yInit + rBase * sin(radian) * 0.02);
let pR = rBase + rDiv * noise(pN);
let pX = xInit + pR * cos(radian);
let pY = yInit + pR * sin(radian);
ellipse(pX, pY, 2.0, 2.0);
}
}
// 参考:https://openprocessing.org/sketch/1136051/ (takawo)
push();
circle(width / 2, height / 2, 500);
fill(random(c));
// noStroke();
stroke(random(c));
strokeWeight(3);
drawingContext.clip();
for (let i = 0; i < 200; i++) {
let x = random(width);
let y = random(height);
let angle = random(360)
push();
translate(x, y);
rotate(angle);
rect(0, 0, 50, 50,30,15,1);
circle(0,0,30);
pop();
}
pop();
noLoop();
}
function mousePressed() {
loop();
}