- /
-
Golden Snitch
on 30 Oct 2022
- 2
- 133
- 0
- 1
- 280
% Remix of original, amazing collatz feather by taozim:
% https://www.mathworks.com/matlabcentral/communitycontests/contests/4/entries/1686
% Variation co-designed with my daughter!
c=@(n)(mod(n,2)*(2*n+1)+n)/2;
s=@cumsum;
figure(Color='k',Ren='p')
hold
for a=3:5:9000
while a>1
a=[c(a(1)) a];
end
t=s(mod(a,2)*.3-.2);
p=@(x)plot(x*s(cos(t))/6+x,x*s(sin(t))/6+x,'Col',[1 1 1 .1]);
p(1);
p(-1);
end
scatter([0,.1,.5],[0,.1,.7],[8,7,1]*6e3,[.8,.8,.3;1,1,.5;1,1,1],'.')
axis off
camva(3)