【Processing】モアレをつくってみる
モアレ #processing #creativecoding pic.twitter.com/nI5LPXG36R
— 94! (@_94_94_94) 2020年10月30日
ボーダーを重ねてモアレをつくってみた。
3層のボーダーを重ねて回転する。
固定、右回転、左回転。
次は違う動かしもやってみよう。
void setup() { size(500, 500); } void draw() { translate(width/2, height/2); background(250); int space = 4; for (int i = -250; i <= 250; i += space*2) { strokeWeight(space); line(i, -250, i, 250); } pushMatrix(); rotate(radians(frameCount)); for (int j = -250; j <= 250; j += space*2) { strokeWeight(space); line(j, -250, j, 250); } rotate(radians(frameCount*-3)); for (int k = -250; k <= 250; k += space*2) { strokeWeight(space); line(k, -250, k, 250); } popMatrix(); }