I am working on a particle simulation where there is no gravitational force exerted on particles, they simply travel through space and, upon collision, change trajectories accordingly. There isn't a set number of dimensions the simulation can be run on, with the minimum being 2.
Each particle has three attributes: radius (each particle is an $n$-ball of $n$ dimensions corresponding to the simulation's dimensions), coordinates (a tuple describing its position), and velocity (another tuple describing how quickly it moves in any given direction, determining where it will be on the next iteration).
With the coordinates one can determine exactly the angle at which it strikes another particle, and that should be enough to determine the new velocities of both particles, or so I think. However, I'm not sure how to do this for an unknown amount of dimensions. I would presume a sigma function could describe this behaviour well, but I'm not sure how to write it. How might I go about doing so?
Any necessary information can be added upon request.