1
//def float : p1 = 0.3471168881, p2 = 0.5327249454
3
import "models/tbp.s-ode" :
6
m1 : 1.0, X1 : [-1.0, 0.0], V1 : [0.0, 1.0],
7
m2 : 1.0, X2 : [1.0, 0.0], V2 : [0.0, -1.0],
8
m3 : 1.0, X3 : [0.0, 1.0], V3 : [0.0, 0.0],
11
import "/data/modules/chart.s-script" : chart
13
chart.init("Three Body Problem")
14
chart.addSeries("X1", chart.style.line)
15
chart.addSeries("X2", chart.style.line)
16
chart.addSeries("X3", chart.style.line)
18
import "modules/scene.s-script" : scene =
24
callback : fn [chart, tbp] () {
25
chart.addPoint("X1", tbp.X1[0], tbp.X1[1])
26
chart.addPoint("X2", tbp.X2[0], tbp.X2[1])
27
chart.addPoint("X3", tbp.X3[0], tbp.X3[1])