Posts Tagged ‘discrete’

Making Waves 2

April 23, 2012 2 comments

Last time, I promised I’d show you how to simulate quantum effects in the comfort of your own home. H0wever, I didn’t get that far. I showed you how to make simple waves that would travel across an irregular network, and that was about it. While the waves I showed you did allow us to think about the ways in which elements of discretized space were similar to waves or particles, they didn’t look much like the kind of waves we’re used to seeing in, say, water, let alone electromagnetism. So, this time, we’re going to start making the waves a little more realistic.

First, let’s remind ourselves what our waves from last time looked like.

Pretty, perhaps, and with many useful properties, such as the fact that the same algorithm will work in any number of dimensions. However, these waves have one obvious glaring flaw: they’re not round. So let’s fix that by using the following rule.

  1. Make two sets, A and B, and put a single point in A.
  2. Find all the points that are neighbors to the elements of set A or B, but not already in A or B.
  3. Make those elements the new set A, and the make the elements that were in A the new set B.
  4. Go back to step 2 and iterate.

As you can see. This rule is even simpler than the one we used last time, and this time the waves are always round.

Next, let’s give the wave a wavelength. To do this, let’s have several sets instead of just two. How about five? Let’s update the rule as follows.

  1. Make a list of five sets, numbered One to Five, and put a single point in set One.
  2. Find all the points that are neighbors to any of our sets, but which aren’t already in the sets.
  3. Make those elements the new set One, make the new set Two equal the contents of the old set One, and so on until we reach the end of the list of sets.
  4. Go back to step 2 and iterate.

When we run this rule, it looks like this.

However, we still have a problem, and it’s crucial. Our waves don’t interfere with each other. In this respect, they’re completely unlike the kind of waves we want for quantum effects. To solve this, we have to do something a bit clever. Rather than using a single wave, we’re going to use a collection of waves, or a ‘meta-wave’, if you like. Furthermore, we’re going to say that some of the points in our network are ‘special’. We’ll pick these special points at random and make the number of them just a small fraction of the total set of points in the network.

What we’re going to do at each turn is advance all the waves in our collection. But if one of the waves bumps into one of these special points, we’re going to add a new wave to our collection, starting at that point. To make things a little clearer, here’s the new rule.

  1. Make a set of round wave generators that use the ‘wave with wavelength’ rule listed above. Start it off with just one wave, and put just a single point in that wave.
  2. Advance all the waves in our collection by a single step.
  3. If one of the waves advanced onto a special point that isn’t in the wave, and now has a special point in its set One, start a new wave using that point, and add it to our collection.
  4. Go back to step 2 and iterate.

Now if we run our rule, we get something that looks rather different. In order to see what’s going on, I’m going to use a different coloring system, to let the effects of the different waves combine together.

Now we’re getting somewhere interesting. It might not look like much yet, but unlike a normal excitation wave, our meta-wave can pass through itself. This is because the individual waves that it’s comprised of don’t share any information, and each individual wave only contributes a small amount to the overall result. Furthermore, the meta-wave never loses strength. Though it becomes ever more costly to compute, it can go on growing forever. Next time we talk about waves, we’ll put this idea of interference to the test and show you some of the exciting things that it gives us.