• Remix
  • Share
  • New Entry

on 17 Oct 2022
  • 4
  • 47
  • 0
  • 0
  • 280
% Inspired by the work of Paul Bourke
% see http://paulbourke.net/fractals/clifford/
N = 1e8;
x = single(zeros(N,1)); % required for speed up
y = x;
F = @(x,y) [,];
% Clifford Attractor - discrete system
for k=1:N-1
x(k+1)=sin(-2*y(k))+cos(-2*x(k));
y(k+1)=+sin(2.2*x(k))-cos(2*y(k)+1.9);
end
I = zeros(900);
E = 1;
D = size(I,1) - 2*E;
for k=1:N
W=ceil(D*(x(k)+2)/4)+E;
U=ceil(D*(y(k)+2)/4)+E;
I(W,U)=I(W,U)+.008;
end
imshow(I);
set(gcf,'Color','b');
axis off
Image
Remix Tree