Using a complex energy density functional derived from the Reid soft-core potential, the changes in nuclear shapes of two colliding 2~ are investigated. A{ each separation distance R, the total binding energy of the Pb + Pb system is minimized w.r.t, the quadrupole deformation and diffuseness parameters of nuclear densities. It is found that the nuclear shapes are strongly affected by the nuclear and Coulomb interactions. A sudden transition occurs from oblate to prolate shapes around R ~ -16.8fm and a smooth one from prolate to oblate shapes around R -11.76 fm.