• Remix
  • Share
  • New Entry

  • Eugen Prel

  • /
  • Chaos game inside a regular enneagon

on 29 Oct 2021
  • 4
  • 21
  • 9
  • 0
  • 245
n=1e5;
P=nsidedpoly(9);
M=P.Vertices;
r=@randi;
figure('Color','#BF8397');
hold on;
F=zeros(n,2);
p=[0,0];
s=0;
for i=1:n
R=r(9);
while s==R
R=r(9);
end
q=M(R,:);
s=R;
p=(p+q)/3;
F(i,:)=p;
end
plot(F(:,1),F(:,2),'Col','#4C2834','LineS','n','Marker','.','MarkerS',1);
axis equal off;
Remix Tree
Load full remix tree