Last active
February 7, 2026 06:23
-
-
Save Sgeo/d095e6992ada8b3cdfb3b4b5473f9fbe to your computer and use it in GitHub Desktop.
gravity_actions_solved.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Previously derived approximation: | |
| let r(t) be the distance from the GravityAction at time t. | |
| let f(t) be the force of the GravityAction at time t. | |
| r'(t) = -f(t)/r(t) | |
| With help from HyperRogue Discord's off-topic channel: | |
| dr/dt = -f(t)/r(t) | |
| r(t) dr = -f(t) dt | |
| ∫ r(t) dr = ∫ -f(t) dt | |
| r²(t)/2 = -F(t) + C (where F(t) is an antiderivative of f(t)) | |
| r(t) = ±√(-2F(t) + C) | |
| For convenience I'll ignore negative r(t) | |
| r(t) = √(-2F(t) + C) | |
| Let r₀ = r(0) | |
| r(0) = √(-2F(0) + C) = r₀; | |
| -2F(0) + C = r₀² | |
| C = r₀² + 2F(0) | |
| r(t) = √(-2F(t) + r₀² + 2F(0)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment