File:Orbital 3p1-3px animation.gif

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Orbital_3p1-3px_animation.gif (220 × 180 pixels, file size: 669 KB, MIME type: image/gif, looped, 60 frames, 6.9 s)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
English: Animation of a hydrogen 3p-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

[edit]

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 = '3porbital_'
nframes = 60
n, l = 3, 1

for i in range(nframes):
    t = (i + 14) % 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.0,
                 fname=fname, density=heuristic_density(n, l, 1))
    
    if '{:.2f}'.format(a1) == '1.00' and '{:.2f}'.format(a2) == '0.00':
        psi1 = r'\    |3p1⟩            '
    else:
        psi1 = '{:.2f}|3p1⟩ + {:.2f}|3p-1⟩'.format(a1, a2)
    if '{:.2f}'.format(b1) == '1.00' and '{:.2f}'.format(b2) == '0.00':
        psi2 = r'\    |3px⟩             '
    else:
        psi2 = '{:.2f}|3px⟩ + {:.2f}i|3py⟩'.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 16 -set delay 200 \) -swap 16,-1 +delete \( \
-clone 46 -set delay 200 \) -swap 46,-1 +delete Orbital_3p1-3px_animation.gif'.format(basename)
os.system(assemble_gif)

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
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.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current16:53, 25 March 2018Thumbnail for version as of 16:53, 25 March 2018220 × 180 (669 KB)Geek3 (talk | contribs)User created page with UploadWizard

The following page uses this file: