Electron Diffraction Pattern Simulation Theory