function M=att(n) a=1.5; b=1.84; c=-2; d=-1.8; x(1)=0; x(2)=0; nul=1000; for nul=1:1000 x(1)=sin(a*x(2))-cos(b*x(1)); x(2)=sin(c*x(1))-cos(d*x(2)); nul=nul-1; end res=2048; M = zeros(res,res,3); y = x; oldy1 = x; oldy2 = x; for i=1:n oldy2 = oldy1; oldy1 = y; y(1) = sin(a*x(2))-cos(b*x(1)); y(2) = sin(c*x(1))-cos(d*x(2)); diff = y-x; curv = (y-2*oldy1+oldy2)/2; x = y; posi = 1+min(res-1, max(0, round((x(1) + 2)/4.1*res))); posj = 1+min(res-1, max(0, round((x(2) + 2)/4.1*res))); M(posi, posj,1) = M(posi,posj,1) + abs(diff(1)); M(posi, posj,2) = M(posi,posj,2) + abs(diff(2)); M(posi, posj,3) = M(posi,posj,3) + norm(curv); end max(max(M))