About 10 months ago, I attempted to create a simulation sandbox for atomic reactions using the Unity game engine. I wanted to see just how much the engine could handle before it became incredibly unstable. I stumbled back across this project recently and thought that it would only be right to talk about it.
Each "atom" was created with the default unity 3-dimensional sphere game object, the "atom" would also have a sphere collider attached and my own custom C# script that contained properties that defined the "states" of the "atom".
The "states" included properties such as the number of protons, neutrons, and electrons (in each shell). This also included several other properties such as whether or not the "atom" was radioactive, magnetic, or stable. There were even properties for compounds, gases, and liquids; making this quite the ambitious simulation.
Upon the unfortunately frequent circumstance that an "atom" collided with another, the simulation would attempt to compute if the atoms were "compatible" and could become a compound by physically connecting to one another using a Unity "hinge" component at the collision position. If they were not "compatible" and rejected one another, they would reject one another by applying a small amount of force to each other.
Within the simulation at the time of testing, there were only 6 different types of "atoms", these elements were selected intentionally due to their commonality within the real universe and how simple they are atomically. The elements chosen were:
- Carbon
- Hydrogen
- Oxygen
- Chlorine
- Beryllium
- Random Mutation
Comments
Post a Comment