# Beautiful Spherical Harmonics

Spherical Harmonics are obtained by solving schrodinger equations with spherical symmetry, for example: hydrogen atom.
$\frac{1}{\sin{\theta}}\frac{\partial}{\partial \theta}(\sin{\theta} \frac{\partial Y_{lm}}{\partial \theta}) + \frac{1}{\sin^2{\theta}} \frac{\partial^2 Y_{lm}}{\partial \phi^2} = -l(l+1) Y_{lm}$

which has the following solution:

$Y_{lm}(\theta,\phi) = (-1)^m \sqrt{\frac{2l+1}{4\pi}\frac{(l-m)!}{(l+m)!}}P^m_l(\cos{\theta})\cdot e^{im\phi}$

$s = Y^0_0$

$p_x = \sqrt{\frac{1}{2}}(Y^{-1}_1-Y^1_1)$

$p_y = i\sqrt{\frac{1}{2}}(Y^{-1}_1+Y^1_1)$

$p_z = Y^0_1$

$d_{z^2}= Y^0_2$

$d_{yz} =i\sqrt{\frac{1}{2}}(Y^{-1}_2+Y^{1}_2)$

$d_{xz} = \sqrt{\frac{1}{2}}(Y^{-1}_2-Y^{1}_2)$

$d_{xy} =i\sqrt{\frac{1}{2}}(Y^{-2}_2-Y^2_2)$

$d_{x^2-y^2}=\sqrt{\frac{1}{2}}(Y^{-2}_2+Y^2_2)$

The following figures are illustration of probability density of some low energy orbitals.

I use gnuplot to draw these functions, here is an example: 

reset
set term pngcairo font "Arial,60" size 1600,1600
set output "dx2-y2.png"
set style line 1 lc rgb '#157545' lt 1 lw 0.6 # --- green lines

#The following color settings are from: http://www.gnuplotting.org/klein-bottle/
set pm3d depthorder hidden3d 1
set hidden3d
set style fill transparent solid 0.65
set palette rgb 9,9,3
unset colorbox

unset autoscale
set parametric
set angle degree
set urange [0:360]
set vrange [0:180]
set isosample 100,100
set ticslevel 0
set lmargin 3
set xr [-0.40:0.40]
set yr [-0.40:0.40]
set zr [-0.40:0.40]
unset tics
set xlabel 'x' offset 2
set ylabel 'y' offset -3
set zlabel 'z' offset 6
fx(u,v)=cos(u)*sin(v)
fy(u,v)=sin(u)*sin(v)
fz(v)=cos(v)
a(u,v)= 0.4 * ( fx(u,v)**2-fy(u,v)**2 )**2
set view 70,20
set view equal xyz
splot a(u,v)*fx(u,v),a(u,v)*fy(u,v),a(u,v)*fz(v) t 'dx^2-y^2 orbital' w pm3d

set output