• Remix
  • Share
  • New Entry

on 8 Nov 2023
  • 3
  • 13
  • 0
  • 0
  • 298
drawframe(1);
Write your drawframe function below
function drawframe(f)
% according to https://de.mathworks.com/matlabcentral/communitycontests/contests/5/entries/11428
c=@(n)(mod(n,2)*(2*n+1)+n)/2;
s=@cumsum;
figure('Color','w','Renderer','painters')
hold on
for a=3:19:round(2021*(50/(49-f)))
while a(1)>1
a=[c(a(1)) a];
end
t=s(rescale(mod(a,2),-.09,.08));
rng(f*2);
m=rand;n=rand;
plot(s(m*sin(t)),s(m*cosh(2*n*t)),'Color',[.3 .3 .3 .1]);
end
axis equal off
xlim([-40 5])
ylim([0 150])
end
Animation
Remix Tree