Continue(s)

Twitter:@dn0t_ GitHub:@ogrew

【週刊p5js】work18

f:id:taiga006:20200628135628j:plain

let max = 400;
let scale = 0.001;
let cd;

let xmin, xmax;
let ymin, ymax;
let cx, cy;

let size;

function setup() {
    createCanvas(900, 900);
    colorMode(HSB, 360, 100, 100, 100);

    smooth();
    noStroke();
    noLoop();

    background("#FAFAFA");
    cd = color("#222222");
    rectMode(CENTER);
}

function grain() {
    fill("#E6E8EC");
    noStroke();
    for(let i = 0; i < 20000; i++) {
        ellipse(random(width), random(height), 2, 2);
    }
}

function draw() {
    xmin = random(0.1, 0.4);
    xmax = 1.0 - xmin;
    ymin = random(0.1, 0.4);
    ymax = 1.0 - ymin;
    cx = random(20.05, 30.05);
    cy = random(10.05, 40.05);

    size = 30;

    grain();

    for(let x = xmin; x <= xmax; x += 0.03) {
        for(let y = ymin; y <= ymax; y += 0.03) {
            let xp = x;
            let yp = y;
            for(let cnt = 0; cnt < max; ++cnt) {
                xp += scale * cos(TWO_PI * noise(xp, yp) * cx);
                yp += scale * sin(TWO_PI * noise(yp, xp) * cy);


                let ratio = map(cnt, 0, max, 0.0, 1.0);
                strokeWeight(sin(PI * ratio) * 10);
                let hue = map(ratio, 0.0, 1.0, 180, 360);
                let cd = color(hue, 40, 90);
                cd.setAlpha(cos(PI * ratio * noise(ratio)) * 10);
                stroke(cd);
                point(xp * width, yp * height);
            }
        }
    }

    noFill();
    strokeWeight(2);
    stroke("#222222");
    rect(width / 2 , height / 2, width * 0.8, height *0.8);
    fill("#222222");
    rect(width * 0.1, height * 0.1, size, size);
    rect(width * 0.9, height * 0.1, size, size);
    rect(width * 0.9, height * 0.9, size, size);
    rect(width * 0.1, height * 0.9, size, size);
}

今週の作品メモ

📌 今週は、@deconbatch先生のnoteを参考にVector Fieldの扱いを勉強しました。
note.com 📌 英語だけど@deconbatchさんの過去作品とその解説が書かれているブログも最高です。(私が特に好きなやつ)
www.deconbatch.com

今週の雑談

📌 Citrus in the rain の6月の新曲リリックビデオを制作しました。
www.youtube.com 📌 Blenderでちまちまと制作していたミニチュアの部屋を舞台に女の子の思い出の部屋、そこからの旅立ちを表現しています。
📌 ひさしぶりにTouchDesignerをいじりました。

📌 少し目を話していた好きにまた面白そうなTutorialが増えていやがる…(TDSWのも含めて。)

今週のラジオ

📌 赤い公園のTHE PARKと、波よ聞いてくれの最終回と、漫画「ダブル」と、野木亜紀子と、「SUNNY 強い気持ち・強い愛」の三浦春馬が好きという話をしました!!