]> permondes.de Git - Analog_Engine.git/blob - scripts/Gravity-1-dimensional.LACE
Focus on potential fields
[Analog_Engine.git] / scripts / Gravity-1-dimensional.LACE
1 # Gravity – 1-dimensional.LACE
2 # The small mass m moves along the direct connection line towards mass M.
3 # r'' = -gamma*M / r^2
4
5 coefficient(1): +1 -> r0' # -1 to move initially towards M, +1 to move away from it
6 coefficient(2): -1 -> -r0 # initial distance of m to M
7 coefficient(3): +1 -> gamma*M # will be inverted in division
8
9 iintegrate r'' -> -r'
10 IC: r0'
11 iintegrate -r' -> r
12 IC: -r0
13 multiply r, r -> r^2
14 idivide gamma*M, r^2 -> -gamma*M/r^2
15 assign -gamma*M/r^2 -> r''
16
17 output(x): r # distance
18 invert -r' -> r'
19 output(y): r' # speed and direction
20 output(z): r'' # acceleration (always towards M)