• Remix
  • Share
  • New Entry

on 19 Oct 2021
  • 14
  • 70
  • 0
  • 0
  • 279
% Inspired by Owl City - Fireflies
f=@rand;
axes(Po=[0 0 1 1],Color='k',Ali=[.9,8],XLi=[0,6],YLi=[-.4,4]);
hold
Current plot held
fill([0,0:6/497:6,6],[0,sin(.4:1.6/497:2)+f(1,498)/3,0]-.7,[0 .25 0])
% Fireflies
% Designed for default figure size
for i=1:150
t=f(1,99)*6;
r=f(1,99)/15;
h=scatter(f()*6+r.*cos(t),f()*randg(2)+r.*sin(t),9,'y','f');
set(h,MarkerFaceA='f',AlphaData=1-r+f()/3) % final rand adds depth variability
end
Remix Tree