- /
-
The Letter "N" as Attractor
on 16 Oct 2022
- 39
- 94
- 0
- 0
- 280
% Inspired by the work of Paul Bourke
% see http://paulbourke.net/fractals/N/
N=1e8;
x=single(zeros(N,1)); % required for speed up
y=x;
% N-Attractor - discrete system
for k=1:N-1
c0=1.7; %1.6831349342542232;
c1=-3; %-2.9984035545418575;
c2=2.12; %2.1207267208634164;
c3=-c2; %-2.121518002564899;
u=x(k);
v=y(k);
X=u*(u*u+1)/2;
Y=v*(v*v+1)/2;
x(k+1)=c0*sin(v-Y)+c1*tanh(u-X);
y(k+1)=c2*sin(u-X)+c3/cosh(v-Y);
end
I=ones(800);
D=size(I,1);
for k=1:N
W=ceil(D*(x(k)+5)/10);
U=ceil(D-D*(y(k)+5)/8);
I(U,W)=I(U,W)-1e-3;
end
imshow(I);
axis equal;