Simulate X-ray diffraction patterns and explore the relationship between crystal structure and diffraction peaks