Atom models

Based on my work with rendering and my interest in computational chemistry I decided to try simple modeling of the behavior of ions and molecules.

Ion model

To start I used a simple model with positive and negative ions, that are attracted to the opposite polarity. I also included a stronger, shorter range force to represent nuclear repulsion that prevents ions from colliding. The graph shows the force curves for similar and oppositely charged ions from this equation.

$$ F=-\frac{k_1q_1q_1}{r^2} - \frac{k_2}{r^6} $$

Then I created several ions each with position, velocity and acceleration represented as vectors. I changed time in small steps, and each time step I determined the acceleration by summing the forces from all the other ions. Then I altered the velocity using the acceleration and the position using the velocity. This means that I am approximating a smooth movement path with a series small linear jumps as represented in the second graph, only with finer steps.

Then I rendered each of the time steps to create individual video frames and combined them into a video. I also constricted the ions to boxes to stop them from flying away and I had to break the conservation of energy to get stable results. It took a lot of trial and error to create something that look interesting but eventually I was able to observe behaviors like the formation of pairs, chains and even a lattice.

Water model

The obvious next step from ions was molecules, so I chose the basic water molecule. This was a lot more complicated to create because I had to deal with angular rotation and momentum (I taught myself lots of math and physics). I represented water with 3 ions with fixed relative positions. Every time step I went through the process of calculating:

  1. Forces on each ion in each water
  2. Torque and attractive force
  3. Angular velocity and velocity
  4. Rotation and position

As always it took lots of trial and error, and I have included some of the errors here:

And here are the better ones:

Unit cell models

I did materials science and one assignment asked for atomic lattice sketches, so in my typical overcomplicated style I decided to render them instead of draw them.