Factor in the distance travelled beyond the edges.
Make the calculations a bit more readable.
Shorten the variable names.
Implement charge-based interactions.