xxxxxxxxxx
35
function setup() {
createCanvas(400, 400);
}
t=0
dt=0.005
function draw() {
background(220);
s = map(noise(t), 0, 1, -1, 1)
k = map(noise(t, s), 0, 1, -1, 1)
d = map(abs(s-k), 0, 1, 0, 1)
q = map(noise(t), 0, 1, 8, 13)
w = map(noise(q), 0, 1, 7, 14)
stroke(lerpColor(color('rgb(0,255,0)'), color('red'), d))
fill(lerpColor(color('rgb(0,255,0)'), color('red'), d))
for (var i = -100 ; i < 100; i += 0.5) {
x = 200 + s*100 + i
y = i**2/w + 50
circle(x,y , 5)
x = 200 + k*100 + i
y = i**2/q + 50
circle(x,y , 5)
}
t+=dt
}