- /
-
Chaos game inside a regular tetrakaidecagon
on 30 Oct 2021
- 6
- 35
- 4
- 0
- 238
n=1e4;
P=nsidedpoly(14);
M=P.Vertices;
r=@randi;
figure('Color','#08546C');
hold on;
F=zeros(n,2);
p=[0,0];
s=0;
for i=1:n
R=r(14);
while s==R
R=r(14);
end
q=M(R,:);
s=R;
p=(p+q)/7;
F(i,:)=p;
end
plot(F(:,1),F(:,2),'Col',[1,1,1,.05],'Marker','.','MarkerS',1);
axis equal off;