Controlled Chaos – Particle Walker


The question of whether anything in nature is truly random is a daunting one – perhaps unanswerable in the terms of our present understanding. Yet, many things in nature appear random so much as we can apprehend them. For this assignment, the goal was to visually represent a natural phenomenon without using any programmatically generated “randomness.” This was a difficult challenge, which made clear how readily we look to the notion of randomness in our consideration of the characteristics of the natural world. In answer to this challenge, I created the Particle Walker, which combines some conceptual elements of cellular automata with a simulation of the physical dynamics of elastic collisions.

The Particle Walker procedure:

Upon startup, the user is presented with a motionless walker (a gray square). The user clicks somewhere inside of the walker, drags to another point inside the walker and then releases the mouse to instantiate a single “particle,” which is represented by a small circle. The particle’s initial position is constituted by the coordinates of the initial mouse click. The difference between this point and the location where the mouse button was released constitutes the particle’s velocity vector. The particles have been programmed to have dynamic collisions with the boundaries of the walker and with one another. The particle-particle collision procedure incorporates Conservation of Momentum equations, making the interaction between particles something like that between real-world billiard balls. The user may add as many particles to the walker as he or she wishes and may also change their radii and maximum velocities as well as the size of the walker itself.

The image below presents a relatively small group of particles bouncing around a walker: (For demonstration purposes, a particle is filled with red if it has had a collision within a certain number of frames – in this case ten – and is otherwise gray.)

The key to the Particle Walker is that when a particle collides with one of the walker boundaries, it moves the entire walker by a single pixel in one of four directions: up, down, left or right depending on which boundary is hit. So, if there were only one particle in the system and it were bouncing back and forth between the left and right boundaries, the walker would simply move back and forth by one pixel along the horizontal axis. But with a large number of particles instantiated, the walker’s movement will not be as regular. We may assume that for a large number of particles viewed over many frames, there is likely to be a more or less equal distribution in the number of collisions that each of the four boundaries experiences. Yet, over the course of a few frames, an even balance is by no means assured. For example, it is possible that four particles will hit the left wall before any hit the right. From this, some quite irregular starts to emerge, something which feels a lot like Brownian Motion. Of course, there is nothing random about the Particle Walker’s motion, it is entirely deterministic. For any particular time value, we could extract the position and dimension of the walker as well as the positions, velocity vectors and radii of the particles and calculate any future state of the system from these datapoints. The irregularity of the walker’s motion can therefore be attributed to the complexity of the initial state – the position(/velocity) of the particles and walker at the time of their instantiation – being repeatedly compounded by the dynamics simulation over many successive states.

The two images below were generated by drawing the walker’s path (as represented by the 2D position of its center) over the course of many frames. The characteristics of the generated image will be affected by the size of the walker and particles as well as the maximum velocity and number of particles in the system. The line has been shaded to show its temporal path – a darker portion represents an earlier frame and bright green represents a later one.

An image generated by the Particle Walker.

A variation using different parameters.

Download Particle Walker source code (Processing).

View Particle Walker web applet (may not work in all broswers).

A question that arises from this is even though the system is entirely deterministic and so all future states can be calculated from the complete knowledge of any previous state, can a particular state be calculated from a previous state in fewer steps than it would take to solve each state between the two in question? I believe the answer is no.

  1. #1 by Kevin Cronin on March 2, 2010 - 11:27 am

    In answer to your query, I think too the answer is no. The position of the walker in space depends on the collisions of the particles with it and to determine whether or when a collision between a particle and the walker occurs, you must know the position of the walker. So their motions are coupled.

    Which is the correct answer?

  2. #2 by Patrick on March 4, 2010 - 12:46 pm

    Your reasoning is sound. Stephen Wolfram deals with this issue in A New Kind of Science. In response to Wolfram, Raymond Kurzweil offers the following: “Wolfram makes the valid point that certain (indeed most) computational processes are not predictable. In other words, we cannot predict future states without running the entire process. I agree with Wolfram that we can only know the answer in advance if somehow we can simulate a process at a faster speed. Given that the Universe runs at the fastest speed it can run, there is usually no way to short circuit the process. However, we have the benefits of the mill of billions of years of evolution, which is responsible for the greatly increased order of complexity in the natural world. We can now benefit from it by using our evolved tools to reverse-engineer the products of biological evolution.” (from KurzweilAI.net)

(will not be published)