pakt29
Built with p5.js and SuperCollider. See /f0blog/pact-februari/
//pakt29
let cols, rows, index;
let oy;
let dashes= [];
function setup() {
let div= select('#sketch');
let cnv= createCanvas(div.width, div.height);
cnv.parent('sketch');
frameRate(60);
colorMode(HSB, 255);
strokeWeight(20);
cols= 20;
rows= 20;
index= 0;
oy= 0.025*height;
dashes= [];
}
function draw() {
background(0);
for(let x= 0; x<cols; x++) {
let t= x/cols;
let xx= t*width+(0.5/cols*width);
stroke(color(((sin(t*PI)*0.25+(index*0.0004+(x*0.02)))*255)%255, map(sin(t*PI), -1, 1, 0, 127), map(sin(t*PI), -1, 1, 0, 255)));
for(let y= 0; y<rows; y++) {
dashes[y]= sin((index+y)*(sin((index*0.1+(x*0.35))*0.01)*0.015))*10+(sin((index+x)*0.003)*40+70);
}
let off= index%(dashes[0]+dashes[1]);
let yy= height-oy;
let i= 0;
while(yy>(-0.5*height)) {
let d= dashes[i%rows];
if(i%2==0) {
let start= constrain(yy+off, oy, height-oy);
let end= constrain(yy-d+off, oy, height-oy);
if(start!=end) {
line(xx, start, xx, end);
}
}
yy -= d;
i += 1;
}
}
index++;
}
Ndef(\wrap).play
(
Ndef(\wrap, {var n= 29; Splay.ar({|i|
var w= i+LFSaw.ar(i+1*SinOsc.ar(0.1, i/n*2pi, 1, 0.1), 0, 2, 2);
Saw.ar(340+LFSaw.ar(0.1, i/n, 10, 10).round(20)+i)%Saw.ar(60+w, SinOsc.ar(0.01, i/n*2pi, 2, 2.05))*0.25;
}!n)});
)
Ndef(\wrap).stop