In the current study, a simulation technique has been employed to calculate the total potential between two deformed nuclei. It has been shown that this simulation technique is an efficient one for calculating the total potential for all possible orientations between the symmetry axes of the interacting nuclei using the realistic nuclear matter density and the M3Y nucleon-nucleon effective forces. The analysis of the results obtained for the 48Ca + 238U, 46Ti + 46Ti, and 27Al + 70Ge reactions reveal that considering the density dependent effects in the M3Y forces causes the nuclear potential to drop by an amount of 0.4 MeV.