Placing multiple planets in a 3d space and introducing a moving object and tracking its movement as a curve?

i basically want to place a random amount of spheres with gravity/attraction and varying diameters in a 3D space and fire small objects in the space and track their movement as curves. So, in the end I hope it gives me some interesting forms which I can then use for my architectural project. I’m studying warping caused by gravity in my project.

I have attached a sketch which shows five planets/gravity spheres and a moving point, whose path is influenced by the gravity of the spheres.