up

Genuary2021

2021-01-05

Code golf - Moire black satin

Moire interference and Perlin noise create the effect of black satin

The code fits in a tweet and is tagged with '#つぶやきProcessing' = Tweet Processing

(It does need the p5.js library though)

//#genuary Day 5 #genuary2021 code golf #つぶやきProcessing
// moire black satin noise interference
n=2e-3,z=0;
draw=_=>{createCanvas(w=400,w),stroke(0),noFill()
for(let y=-20;y<w;y++){
beginShape()
for(let x=0;x<w;x++){
v=40*noise(x*n, y*n,z),vertex(x,y+v)}
endShape()}
z+=0.01} pic.twitter.com/7CJANjG3b8

— Rich Clarke (@richscrich) January 5, 2021