2
r12 = (147098290000.0 + 152098232000.0) / 2,
3
r23 = (363104000.0 + 405696000) / 2
5
import "models/tbp.s-ode" :
8
m1 : 1.98847e30, X1 : [0.0, 0.0], V1 : [0.0, 0.0],
9
m2 : 5.9726e24, X2 : [r12, 0.0], V2 : [0.0, 29783.0],
10
m3 : 7.3477e22, X3 : [r12+r23, 0.0], V3 : [0.0, 29783.0+1023.0],
13
import "//chart.s-script" : chart
15
chart.init("Sun + Earth + Moon")
16
//chart.addSeries("Sun", chart.style.scatter)
17
chart.addSeries("Earth", chart.style.line)
18
chart.addSeries("Moon", chart.style.line)
20
import "//scene.s-script" : scene =
23
dt : 0.01 * 60*60*24.0,
26
callback : fn [chart, tbp] () {
27
// chart.addPoint("Sun", tbp.X1[0], tbp.X1[1])
28
chart.addPoint("Earth", tbp.X2[0], tbp.X2[1])
29
chart.addPoint("Moon", tbp.X3[0], tbp.X3[1])