If you haven’t read it already, check out Atomic Orbitals Pt. 1. Today, we try and make some prettier pictures. GLVisualize is quite a beautiful package, but not entirely the easiest to use at this point with some not so consistent documentation.

To add this package:

and test with:

But, other steps may be necessary to get the package working. On a Mac, I was required to install the Homebrew.jl package.

Here, create a square cube, and convert those positions over to spherical coordinates.

2p Orbital

2p Orbital block showing the density of the wavefunction.

2p Orbital shown via isosurface.

3d orbitals

3dz2 Orbital shown via isosurface. This corresponds to $n=3$, $l=2$, $m=0$.

A 3d Orbital shown via isosurface. This corresponds to $n=3$, $l=2$, $m=-1$. This is not one of the canonical images, but instead an $m$ shape.

3dxy (x2-y2) orbital shown in density. This is the sum of an $m=-2$ and $m=2$ state, for $n=3,l=2$.

3p

In order to get this 3p surface image to come out correctly, I used the square root of the values instead in order to be able to see the much fainter outer lobe.