6.9.6 A Hydrogen Atom and its Electron Orbit
When creating atom simulations, it is necessary to understand the
theory involved. If you don't know that theory, don't worry, this
example can still give you some ideas.
Some theory first. A hydrogen atom consists of one proton and one
electron. The way how an electron "rotates" around the proton can be
described by using a formula which is well known by scientists. Nobody
knows where the atom is at a certain time value, but a formula can be
used for calculating probability for that. There are only a few
possible states the electron can represent.
So, lets try to implement this.
1. First we need an electron. I don't know what a real electron looks
like, but I assume it looks a bit like a sphere. So, create a
sphere.
2. Then we have to define the formula describing the so called
probability distribution for the sphere. For simplicity,
we use just a random value for that. The variable "rnd" can
be used for that purpose. Therefore, select the sphere,
select the menu Modify/Properties/Tags and add the
following tag to it:
SFOR x=rnd
This generates random values between 0 and 1.
3. Create a SIMPLE SKELETON method to the same level with the
electron.
4. Then we need a new evaluable primitive which represents possible
states of the electron. For hydrogen (if I remember correctly) it is a
sphere whose radius represents these possible states of electron. However,
let us use a circle, whose mathematical formula is very similar to the
formula of the sphere, but is shorter and faster to write. The
mathematical formula defining a circle is:
x = r*sin(2*PI*t)
y = r*cos(2*PI*t)
where "r" is radius of the circle and "t" is the parametrization of it.
When t goes from 0 to 1, x and y coordinates define a perfect circle.
Use Create/Controls/Offset to create an offset primitive under the
method, representing the center point of the circle. Assuming that the
radius remains the same during the animation, say 0.5, add the
following tag to the offset:
SFOR x+=0.5*sin(2*PI*t),y+=0.5*cos(2*PI*t)
This way, we can manipulate the offset so that instead of a single
point, the result is an orbit for the electron (in this case, a circle).
The animation is now ready. When you play it, the time goes from 0 to 1
and the formula attached to the electron object returns random
parameter values. The skeleton method object uses these values to
evaluate a point from its parameter, describing possible positions for
the electron, and then moves the electron to that point.
|