Three-dimensional analytical modeling of nanocrystal memory electrostatics