%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (GS) This code generates random tree pictures %
% I copied this from the picture Jourdan had on his computer %
% https://pannaya.com/falseprophet/ %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear;
figure(‘Color’,[0.8 1 0.75],’units’,’normalized’,’outerposition’,[0 0 1 1]);
axis off
grid off
hold on
set(gcf,’Visible’,’off’);

%(GS) The number of trees in the image can be changed here:
%(GS) If you make the number too big it takes a while to run.
NumTrees=100;

for loop1=1:NumTrees
shiftx=rand10; shifty=rand10;
roots=ceil(rand20); branches=[0 1]; for loop=1:roots adds=min(ceil(randloop),loop);
for loop=0:max(branches)
hits=find(branches==loop);
ys(hits)=log(loop)+shifty+0.5rand(1,length(hits)); end tx=xs(1); ty=ys(end); xy=[xs;ys]’; hold on for loop3=1:length(branches) joins=find(admat(loop3,:)==1); colour=[0.6 0.5 0.3]+rand(1,3)0.1;
for loop2=joins
x=[xs(loop3) xs(loop2)];
y=[ys(loop3) ys(loop2)];
if loop2>6;
colour=[0 1 0]rand0.2+[0 0.8 0];
end
plot(x,y,’Color’,colour,’LineWidth’,10*exp(-loop2/4));
end

```end
colour=[0 0 0];
for loop=1:ceil(rand*15)+2;
colour=colour+randn(1,3)*0.1;
colour(find(colour<0))=0;colour(find(colour>1))=1;
plot(tx+rand*0.3,ty+rand*0.3,'.','Color',colour,'MarkerSize',5)
end
if rand>0.7
colour=[1 0 0];
for loop=1:ceil(rand*15)+2;
colour=colour+randn(1,3)*0.1;
colour(find(colour<0))=0;colour(find(colour>1))=1;
plot(tx+rand*0.3,ty+rand*0.3,'.','Color',colour,'MarkerSize',ceil(rand*25))
end
end```

end

set(gcf,’Visible’,’on’);
I=getframe(gcf);
imwrite(I.cdata, ‘Tree.tiff’,’Compression’,’none’);