Simulation of NMR powder spectra