Attractors

Rössler attractor

The image shown in the right column is rendered in Sunflow. Any renderer that has sphere primitive can be used to generate such images. This formula gives the x,y and z coordinates, these values can be exported as the center of the sphere primitive in that renderer .

numPoints = 100000;

x = zeros(1,numPoints);

y = zeros(1,numPoints);

z = zeros(1,numPoints);

x(1) = 0;%0.10001;

y(1) = 0;%-0.10001;

z(1) = 0;%0.10001;

dt = 0.02;

a = 0.2;

b = 0.2;

c = 8.0;

for n = 2:numPoints

x(n) = x(n-1)+ dt*(-y(n-1)-z(n-1));

y(n) = y(n-1)+ dt*(x(n-1)+a*y(n-1));

z(n) = z(n-1)+ dt*(b+z(n-1)*(x(n-1)-c));

end

% draw connecting line

line(x,y,z,'LineWidth',0.5,'Color',[0.2 0.3 0.5]);

view(3)

axis on equal

box on

% draw only the points

figure

line(x,y,z,'Marker','.'...

,'Markersize',1,...

'Linestyle','none',...

'Color',[0.2 0.3 0.5]);

view(3)

axis on equal

Rössler attractor

box on

Henon attractor

% equation

% x(n+1)=y(n)+1-1.4*x(n)^2

% y(n+1)=0.3*x(n);

numPoints = 15000; % number of points in attrcator

x = zeros(1,numPoints);

y = zeros(1,numPoints);

x(1) = 0; %starting x point

y(1) = 0; %starting y point

a = 1.4;

b = 0.3;

for n = 2:numPoints

x(n) = y(n-1)+1-a*x(n-1)^2;

y(n) = b*x(n-1);

end

https://lh5.googleusercontent.com/-da99hgoObGE/VB7lh4Ib_ZI/AAAAAAAACCg/3hjCcIIB9hA/s144/Henon%2520Attractor.PNG

plot(x,y,'.','MarkerSize',1);

scatter(x,y,1,x);

colormap hsv

axis on