Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some insights on physics of this simulation #28

Open
nort3x opened this issue Jun 23, 2023 · 0 comments
Open

some insights on physics of this simulation #28

nort3x opened this issue Jun 23, 2023 · 0 comments

Comments

@nort3x
Copy link

nort3x commented Jun 23, 2023

physics student here

use velocity verlet method to update velocity and position
it's more efficient than RK4 and it's stable (it doesn't diverge like euler method)

and the wiggly thing is expected and it's because of conservation of energy as ball drops and it gains velocity (kinetic energy) due collision the kinetic energy is transferred to your spring-mass system energy and it wiggles wildly (it's actually temperature) to cancel it out define some dispersion of energy just add a damping factor to your hook law
F = ma = -k* x - d*v
and it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant