- /
-
Animated Water Droplets (Run to see animation)
on 8 Oct 2021
- 3
- 149
- 3
- 0
- 270
q=256;
a=zeros(q);
b=a;
z=@()randi(q);
for i=1:.01:5 %while(1) is prettier
[X,Y]=meshgrid(linspace(i,10+i,q),linspace(1,20,q));
I=sin(X)+cos(Y);
[b,a] = r(a,b);
imshow(I+1.5*a, [-3,3])
if (z()<20)
b(z(),z())=rand()*20-9 ;
end
drawnow;
%i=i+.01;
end
function [o,u]=r(o,u)
m = [0,1,0;1,0,1;0,1,0];
t=filter2(m,o)/2-u;
u = t-t/128;
end