File:Orbital p1-px animation.gif
Orbital_p1-px_animation.gif (220 × 180 pixels, file size: 550 KB, MIME type: image/gif, looped, 60 frames, 6.9 s)
![]() | This is a file from the Wikimedia Commons. Information from its description page there is shown below. Commons is a freely licensed media file repository. You can help. |
Summary
DescriptionOrbital p1-px animation.gif |
English: Animation of a hydrogen p-orbital with varying superposition amplitudes of m=+1 and m=-1. The orbital is shown as a rigid body where the probability density exceeds a well-chosen value. The surface color shows the complex phase of the wave function. The top label is the wavefunction in a basis of m-eigenstates and the bottom label is the same wavefunction in the basis of x- and y-eigenstates. The basis transformation is
|
Date | |
Source | Own work, Created with hydrogen 1.1 |
Author | Geek3 |
Source code
This file was created using the python script hydrogen.py. The animation was assembled with ImageMagick.

This image was created with ImageMagick.
# paste this code at the end of "hydrogen.py" 1.1
basename = 'porbital_'
nframes = 60
n, l = 2, 1
for i in range(nframes):
t = (i + 10) % nframes / float(nframes)
fname = basename + '{:02}.png'.format(i)
print fname
# slow down animation around m=1 at the ring shape
if t < 0.5:
phi = sin(t * pi / 2)**2
else:
phi = sin((1-t) * pi / 2)**2
# rotate population between two eigenstates
a1 = cos(phi * pi / 2)
a2 = sin(phi * pi / 2)
b1 = (a1 + a2) / sqrt(2)
b2 = (a1 - a2) / sqrt(2)
draw_orbital([[n, l, 1, a1], [n, l, -1, a2]], w=220, zoom=1.5,
fname=fname, density=heuristic_density(n, l, 1))
if '{:.2f}'.format(a1) == '1.00' and '{:.2f}'.format(a2) == '0.00':
psi1 = r'\ |2p1⟩ '
else:
psi1 = '{:.2f}|2p1⟩ + {:.2f}|2p-1⟩'.format(a1, a2)
if '{:.2f}'.format(b1) == '1.00' and '{:.2f}'.format(b2) == '0.00':
psi2 = r'\ |2px⟩ '
else:
psi2 = '{:.2f}|2px⟩ + {:.2f}i|2py⟩'.format(b1, b2)
add_text = 'convert {} +antialias -pointsize 15 \
-font "DejaVu-Sans-Mono-Bold" -annotate +12+41 "{}" -annotate +12+192 "{}" \
-crop 220x180+0+20 +repage {}'.format(fname, psi1, psi2, fname)
os.system(add_text)
assemble_gif = r'convert -delay 5 -dispose Background -dither FloydSteinberg \
-colors 256 {}??.png \( -clone 20 -set delay 200 \) -swap 20,-1 +delete \( \
-clone 50 -set delay 200 \) -swap 50,-1 +delete Orbital_p1-px_animation.gif'.format(basename)
os.system(assemble_gif)
Licensing
I, the copyright holder of this work, hereby publish it under the following license:



This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Captions
Add a one-line explanation of what this file represents
Items portrayed in this file
depicts
25 March 2018
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 14:53, 25 March 2018 | ![]() | 220 × 180 (550 KB) | wikimediacommons>Geek3 | User created page with UploadWizard |
File usage
The following page uses this file: