• Remix
  • Share
  • New Entry

  • Eugen Prel

  • /
  • Chaos game inside a regular hexagon

on 29 Oct 2021
  • 3
  • 43
  • 12
  • 0
  • 280
n=1e5;
P=nsidedpoly(6);
M=P.Vertices;
r=@randi;
z=[.87,.87,0];
figure('Color',z);
fill(M(:,1),M(:,2),z,'EdgeC','n');
hold
Current plot held
F=zeros(n,2);
p=[0,0];
s=0;
for i=1:n
R=r(6);
while s==R
R=r(6);
end
q=M(R,:);
s=R;
p=(p+q)/2;
F(i,:)=p;
end
plot(F(:,1),F(:,2),'Col','#696B34','LineS','n','Marker','.','MarkerS',1);
axis equal off;
Remix Tree
Load full remix tree