spheropack#

Random sphere packings in Python, generated with the event-driven Lubachevsky-Stillinger algorithm: spheres move ballistically, collide elastically and grow until a target density is reached or the packing jams or crystallises.

import spheropack as sp

p = sp.pack(n=1000, density=0.6)
p.positions, p.radii