The Discrete Element Method (DEM) has been extensively used to model deformation and stresses developed in soils and rocks. The ever-increasing computational power allows the creation of accurate numerical models using the DEM with a significant number of elements. However, DEM models with equal-sized particles or particles with a narrow range of radii such as those available in current DEM software cannot realistically reflect the physically interactive forces between soil particles, resulting in inaccurate simulation results. This thesis proposes an algorithm to generate circular and spherical particle assemblies that feature particle-size distributions and void ratios derived from actual soil data to improve the accuracy of DEM results. The proposed algorithm can automatically create particle packings with a wide range of radii simulating real soil samples to increase the quality of DEM simulations. The Poisson Disk Sampling and Grid Sampling techniques are introduced to generate models in a random but controllable fashion, meaning that the positions and radii of particles are randomly selected, however, the statistical profile of the particle assembly can be controlled. Similar to soil particle-size analysis, the particle packing is created using a sieve-by-sieve approach. Prior to importing the particle assembly into a DEM simulation system, the algorithm-generated particle assemblies are imported into an open-source DEM framework to complete the model deposition process. This study also includes a number of examples of building 2D and 3D particle assemblies using the proposed algorithm according to laboratory data of pure, mixed, gap graded, uniformly graded, dense, and loose soils to validate the algorithm.