• Remix
  • Share
  • New Entry

on 30 Oct 2021
  • 6
  • 33
  • 0
  • 0
  • 247
n=1e4;
P=nsidedpoly(5);
M=P.Vertices;
r=@randi;
figure('Color','#0C4A83');
hold on;
F=zeros(n,2);
p=[0,0];
s=0;
for i=1:n
R=r(5);
while s==R
R=r(5);
end
q=M(R,:);
s=R;
p=(p+q)/3;
F(i,:)=p;
end
plot(F(:,1),F(:,2),'Col',[1,1,1,.08],'LineS','-','Marker','.','MarkerS',1);
axis equal off;
Remix Tree