2015/07/26

Chaotic attractors are mathematical systems that evolve over time. The Peter de Jong attractors are systems that are especially beautiful, following the underlying equations:

\(x_{n+1} = \sin(a y_n) - \cos(b x_n)\)

\( y_{n+1} = \sin(c x_n) - \cos(d y_n) \)


The choice of the constants a, b, c, d produces radically different attractors.

My personal favourite coefficients are:

\begin{align} a & = 2 \\ b & = 2 \\ c & = -1.2 \\ d & = -1.2 \\ \end{align}

POV-RAY is a free raytracing tool for creating three-dimensional graphics. We can encode the equations above into POV-RAY to produce a visualisation of the Peter de Jong attractor.

light_source {
  0*x                 
  color rgb 1.0       
  area_light
            <8, 0, 0> <0, 0, 8>
  4, 4                
  adaptive 0          
  jitter              
  circular            
  orient              
  translate <40, 80, -40>
}
light_source {
  0*x
  color rgb <1,1,1>
  translate <0,20,-20>
}
/* Peter de Jong style attractor */
#declare x1=0;
#declare y1=0;
#declare i=2000000; // Number of points in the simulation. 
#declare a = -2;
#declare b = -2;
#declare c  = -1.2;
#declare d = -2;
#declare attractor = union {
#while(i>0)
   #declare x2=sin(a*y1)-cos(b*x1);
   #declare y2=sin(c*x1)-cos(d*y1);
   sphere{ <x1,y1,3>, 0.001  
   pigment { rgb <(1-(x2*2)),0.5,(1-(y2*2))> }
   finish{  diffuse 0.7      ambient 0.0      specular 0.3      reflection { 0.8  metallic } }
    }
   #declare x1 = x2;
   #declare y1 = y2;
   #declare i = i - 1;
#end
}
object { attractor scale 2 }
camera {
location < 0,0,-5> 
look_at <0,0,0>
}
plane {
  y,
  -4.0
  hollow on 
  pigment { rgb 1 }
} 

This results in this beautiful render of the attractor