r/Python • • May 28 '19

My simulation of gravity with 1000 particles. PC took a couple of hours to process!

1.8k Upvotes

241 comments sorted by

View all comments

Show parent comments

2

u/energybased May 28 '19

Your link directly contradicts his statement:

It's interesting because only in a universe with three spatial dimensions are stable orbits (think Earth around the Sun in an ellipse) possible.

Stable orbits are possible for any d>2 provided that the force is gravity-like or spring-like.

1

u/Gear5th May 28 '19

This claims that for d>3, it is unstable. https://www.reddit.com/r/askscience/comments/q8fmo/what_would_orbits_look_like_in_a_2d_universe/c3vqva1/

gravity-like or spring-like

springs are inherently stable, since their force can be both attractive or repulsive depending on the distance.

3

u/energybased May 28 '19

springs are inherently stable, since their force can be both attractive or repulsive depending on the distance.

What I meant by spring-like is force linearly proportional to distance, and what I meant by gravity-like is force inverse-quadratically proportional to distance. Your link has nothing to do with either of these cases.

1

u/billsil May 29 '19

But springs are nonlinear :) That's why they buckle.