Understanding 3D functions