anchor.diff:  2. When particle is next to a cluster it sticks to it.
   3. We start with a simple seed cluster consisting of one particle in the center of the visualisation.
   
  -Model is dead simple. Let's see how we can implement it.
  +Model is dead simple. Let's see how we can implement it and generate some pretty pictures.
   
   == View
   
  
positive.code: - particle_density indicating how many particles will we used ( particle_density x width x height )
  - stopping_fraction as we need to specify some stopping condition for our simulation, we will stop when specified fraction of all particles will be part of the cluster
  
  First we need to create field where particles will be moving:
  
  
  [source,javascript]
  ----
  var CLUSTER = 1;
  
  function createField(width, height) {
  	var field = { width:width, height:height, field: new Uint8Array(width * height)	};
  	field.field[Math.floor(width / 2) + Math.floor(height / 2) * width] = CLUSTER;
  	return field;
  }
  ----
  
negative.code: }
  ----
  
  This is pretty much all the logic we need. The rendering function looks like this:
  
  
  [source,javascript]
  ----
  function render(field, canvas, particles, stopping_fraction) {
  	var i = particles.count;
  	while (i--) {
      	var index = (particles.y[i] * field.width + particles.x[i]) * 4;
  
      	var v = Math.sqrt(particles.stuck[i] / (stopping_fraction * particles.count));
      	var color = v > 0 ? colormap(v) : particle_color;
      	canvas[index] = color[0]; // red
          canvas[++index] = color[1]; // green
          canvas[++index] = color[2] ; // blue
          canvas[++index] = 255; // alpha 
  	}
  }
  ----
  
  The start function glues together functions above and triggers render function every frame.
  
  
  You can download finished visualisation code link:https://github.com/xmichaelx/xmichaelx.github.io/tree/master/files/dla[here]. 
  
  
  
  == Sample images
  
  image:dla/23.png[DLA,300] 
  image:dla/36.png[DLA,300] 
  
  image:dla/49.png[DLA,300] 
  image:dla/62.png[DLA,300] 
  
  == Sample animation
  
  image:dla/dla.gif[DLA,300] 
  
  
  
  
  