• Remix
  • Share
  • New Entry

on 13 Oct 2024
  • 33
  • 618
  • 1
  • 8
  • 1963
Cite your audio source here (if applicable):
drawframe(1);
Write your drawframe function below
function drawframe(f)
persistent q m ic u e n X o wg R yg yo ap an aj r m1 b2 a1 d1 x y mu x2 x3 M d x4 O
if f==1
u=@linspace;
e=@rescale;
n=@normpdf;
r=@randperm;
M=@repmat;
O=@round;
d=@rand;
q=600;
m=(d(q)/.5+.5).*floor(randi(3*q,q)/(3*q));
m(m~=0)=1;
ic(:,:,1)=.7*(d(24,3)-.5);
for p=2:48
ic(:,:,p)=ic(:,:,p-1)+(d(24,3)-.5)/80;
end
for p=1:48
ic(:,:,p+48)=ic(:,:,49-p);
end
X=u(-1,1,q);
o=[-.5 .1 .6];
w=.018*(d(24,3).^2);
wg(:,1)=w(r(24));
wg(:,2)=w(r(24));
wg(:,3)=w(r(24));
wg(1:2,:)=.33*ones(2,3);
R=[.77 .97 .12 1 .16 .59; .12 .97 .18 .98 .36 .90; .18 .99 .75 .78 .5 .97];
yg=(d(24,3)+.3)./2.5;
yg(1:2,:)=[1.6 1 1; 1.2 1 1];
yo=d(24,3,1)-.2;
yo(1:2,:,1)=[-.2 .1 .2;-.2 .1 .2];
for p=2:48
yo(1:2,:,p)=yo(1:2,:,p-1)+.15.*(d(2,3)-.5);
yo(3:end,:,p)=yo(3:end,:,p-1)+.1.*(d(22,3)-.5);
end
for p=1:48
yo(1:2,:,p+48)=yo(1:2,:,49-p);
yo(3:end,:,p+48)=yo(3:end,:,49-p)+.1.*(d(22,3)-.5);
end
ap=[.9 .9 .9];
an=[.25 .3 .35];
aj=d(24,1)*.08;
a1=zeros(q);
[y,x]=meshgrid(X,X);
mu=O(d(24,3)+.3)*2-1;
mu(1:2,:)=ones(2,3);
x2=x;
x3=x;
x4=x;
u1=[19 47 61 84 91 119 133 168 188 220 232 277 299 348 356 389 403 463]+50;%x positions of stonehenge vertical blocks
u2=[18 47; 67 108; 130 174;202 375]+50;
v=0;
ds=1;
us=0;
vi=0;
si=0;
ss=0;
s0=1;
sh=0;
for h=1:q
v=v+randn/4;
if ismember(h,u1)
if ds==1
us=1;
ds=0;
vi=0;
else
us=0;
ds=1;
vi=1;
end
end
if us==1
si=si+randn/4;
if vi==0
exs=d(1)*60;
vi=1;
else
exs=60;
end
else
if vi==1
exs=d(1)*60;
vi=0;
else
exs=0;
si=0;
end
end
x2(:,h)=circshift(x(:,h),randi(2)+O(v),1);
x3(:,h)=circshift(x(:,h),-O(exs)+O(v)+O(si),1);
end
co=0;
os=[3 3 3 7];
for my=1:4
for l=u2(my,1)+2:u2(my,2)
if l==u2(my,1)+2
q1=min(find(x3(100:end,l)>.75));
end
co=co-randn/8;
x4(q1-12+100+os(my)-2-O(co):q1+100+os(my),l)=99;
end
end
end
for i=1:3
a=a1;
for j=1:24
y1=y*cos(an(i)+aj(j))+x*sin(an(i)+aj(j));
x1=y*sin(an(i)+aj(j))+x*cos(an(i)+aj(j));
a=a+mu(j,i)*(wg(j,i).^.7).*e(n(y1,ic(j,i,f)+o(i),wg(j,i)),0,1).*e(n(x1,yo(j,i,f),yg(j,i)),0,.5);
end
p1{i}=a.*e((x+3).^.5,.2,1);
for gy=1:3
b1(:,:,gy)=x.*R(i,gy)+.05-(x-.6).*R(i,gy+3);
end
b2{i}=b1.*M(e(p1{i},-.1,ap(i)),1,1,3);
end
m1=m.*(d(q)*.5+.3);
fm=M(m1,1,1,3)+b2{1}+b2{2}+b2{3};
fm(M(x2,1,1,3)>.75)=0;
fm(M(x3,1,1,3)>.75)=0;
fm(M(x4,1,1,3)>98)=0;
image(fm)
camva(4.5)
end
Movie
Audio
Remix Tree