I just got a copy of Mathematica and I'm busy learning the basics. I got mathematica so I can plot hydrogen orbitals but I'm completely lost. I looked around and I found this:
a0 = 1;
ψ[{n_, l_, m_}, {r_, θ_, ϕ_}] :=
With[{ρ = 2 r/(n a0)},
Sqrt[(2/(n a0))^3 (n - l - 1)!/(2 n (n + l)!)] Exp[-ρ/2] ρ^l
LaguerreL[n - l - 1, 2 l + 1, ρ] SphericalHarmonicY[l, m, θ, ϕ]]
DensityPlot3D[
(Abs @
ψ[
{3, 2, 0},
{Sqrt[x^2 + y^2 + z^2], ArcTan[z, Sqrt[x^2 + y^2]], ArcTan[x, y]}])^2,
{x, -10 a0, 10 a0}, {y, -10 a0, 10 a0}, {z, -15 a0, 15 a0},
PlotLegends -> Automatic]
Can I get a quick explanation of what's going on here? I understand that the first part is just defining the hydrogen wave function, but what about the second part? What does the {Sqrt[x^2 + y^2 + z^2], ArcTan[z, Sqrt[x^2 + y^2]], ArcTan[x, y]} term do? Also, is the Abs @ the absolute square of the wave function?

AbsandDensityPlot3D(the latter uses Cartesian coordinates, whereas the wave function is in spherical coords.) – Jens Jul 07 '16 at 18:33ArcTanwith two arguments; it gives the arc tan of the ratio taking into account which quadrant it is in. – QuantumDot Jul 07 '16 at 19:24