• Remix
  • Share
  • New Entry

on 6 Nov 2023
  • 7
  • 23
  • 0
  • 0
  • 233
drawframe(33);
Write your drawframe function below
function drawframe(q)
h=figure;
axis tight manual;
N=2*10^5;
v=zeros(N,2);
a=6;
t=linspace(0,2*pi,a+1);
c=[cos(t);sin(t)]';
p=[0,0];
lc=1;
for i=1:N
idx=randi(a);
lc=idx;
s=c(idx,:);
p=(p+s)/(1+0.05*q);
v(i,:)=p;
end
plot(v(:,1),v(:,2),'.',markersize=1)
xlim([-1,1])
ylim([-1,1])
axis off
end
Animation
Remix Tree