GravitationWithCollisionDetection

GravitationWithCollisionDetection is available as:

The BodyModels actor is a higher-order actors, specifically the MultiInstanceComposite. The model inside that actor is replicated a number of times given by numberOfBodies and mapped over the inputs. The inputs are copies of the positions array (which is an array of arrays) and the outputs are new positions for each of the bodies.