- /
-
bird
on 4 Oct 2021
- 2
- 21
- 0
- 0
- 254
figure('color','w')
axis off
hold
rng(32)
a=2*rand(1)-1;
b=[0;2*rand];
c=2*rand(2)-1;
d=[0;rand];
e=2*rand(2)-1;
f=[0;rand];
x=[0;0];
for i=1:2e4
n=rand;
if n>=.94
x=a*x+d;
elseif n<=.3
x=c*x+f;
elseif n<=1
x=e*x+b;
end
plot(x(1),x(2),'.','markeredgecolor',[2.5*n*sqrt(1-n) n 1-n])
end