Fixed equations for sphere such that th variable is in relation to x and z directions and phi is in relation to y direction.  This fixes the special case of sphere for circle so it creates a flat circle in the xz plane.