configurations = {
let configurations = {};
configurations.twoEqual = [
{ m: 4, x: 0, y: 0, vx: 0, vy: -1 / Math.sqrt(2) },
{ m: 4, x: 1, y: 0, vx: 0, vy: 1 / Math.sqrt(2) }
];
configurations.twoEqual.xmin = -0.2;
configurations.twoEqual.xmax = 1.2;
configurations.twoEqual.ymin = -1 / 2;
configurations.twoEqual.ymax = 1 / 2;
configurations.twoEqual.steps_per_frame = 1;
configurations.twoEqual.dt = 0.001;
configurations.twoEqual.delay = 0;
configurations.twoUnequal = [
{ m: 1, x: 1, y: 0, vx: 0, vy: 2 },
{ m: 20, x: 0, y: 0, vx: 0, vy: -0.1 }
];
configurations.twoUnequal.xmin = -0.2;
configurations.twoUnequal.xmax = 1.2;
configurations.twoUnequal.ymin = -0.4;
configurations.twoUnequal.ymax = 0.4;
configurations.twoUnequal.steps_per_frame = 1;
configurations.twoUnequal.dt = 0.001;
configurations.twoUnequal.delay = 0;
// A symmetric, Eulerian central configuration
// All three points stay on a line segment with one point
// at the center (of mass) and the others revolving around it.
configurations.eulerianSymmetricCentralConfiguration = [
{ m: 4, x: 0, y: 0, vx: 0, vy: -1 },
{ m: 0.5, x: 0.5, y: 0, vx: 0, vy: 0 },
{ m: 4, x: 1, y: 0, vx: 0, vy: 1 }
];
configurations.eulerianSymmetricCentralConfiguration.xmin = -0.2;
configurations.eulerianSymmetricCentralConfiguration.xmax = 1.2;
configurations.eulerianSymmetricCentralConfiguration.ymin = -1 / 2;
configurations.eulerianSymmetricCentralConfiguration.ymax = 1 / 2;
configurations.eulerianSymmetricCentralConfiguration.steps_per_frame = 1;
configurations.eulerianSymmetricCentralConfiguration.dt = 0.001;
configurations.eulerianSymmetricCentralConfiguration.delay = 0;
configurations.eulerianSymmetricCentralConfiguration.period = 844;
// An Eulerian asymmetric central configuration
// All three points stay on a line segment but
// the middle point is not at the center of mass.
configurations.eulerianAsymmetricCentralConfiguration = [
{ m: 100, x: 0, y: 0, vx: 0, vy: -0.618 },
{ m: 10, x: 1, y: 0, vx: 0, vy: 5.419013137068794 },
{ m: 1, x: 1.3629038801971198, y: 0, vx: 0, vy: 7.609868629312047 }
];
configurations.eulerianAsymmetricCentralConfiguration.xmin = -1;
configurations.eulerianAsymmetricCentralConfiguration.xmax = 2;
configurations.eulerianAsymmetricCentralConfiguration.ymin = -1.3;
configurations.eulerianAsymmetricCentralConfiguration.ymax = 1.3;
configurations.eulerianAsymmetricCentralConfiguration.steps_per_frame = 1;
configurations.eulerianAsymmetricCentralConfiguration.dt = 0.001;
configurations.eulerianAsymmetricCentralConfiguration.delay = 5;
configurations.eulerianAsymmetricCentralConfiguration.period = 293;
configurations.threeUnequal = (function() {
let nodes = [
{ m: 20, x: 0, y: 0, vx: 0, vy: -0.1 },
{ m: 1, x: 1, y: 0, vx: 0, vy: 2 },
{ m: 0.0001, x: 1.5, y: 0, vx: 0, vy: 3.5 }
];
nodes.xmin = -1;
nodes.xmax = 2;
nodes.ymin = -1.4;
nodes.ymax = 1.4;
nodes.steps_per_frame = 5;
nodes.dt = 0.001;
nodes.delay = 25;
return nodes;
})();
// Lagrange
configurations.lagrange = (function() {
let nodes = [
{ m: 4, x: 0, y: 0, vx: 0, vy: -1 / Math.sqrt(2) },
{ m: 4, x: 1, y: 0, vx: 0, vy: 1 / Math.sqrt(2) },
{
m: 0.0000001,
x: 1 / 2,
y: Math.sqrt(3) / 2,
vx: -Math.sqrt(3 / 2),
vy: 0
}
];
nodes.xmin = -0.2;
nodes.xmax = 1.2;
nodes.ymin = -0.2;
nodes.ymax = 1;
nodes.steps_per_frame = 20;
nodes.dt = 0.0001;
nodes.delay = 5;
nodes.period = 4 * 480;
return nodes;
})();
// Perturbed Lagrange
configurations.perturbedLagrange = (function() {
let nodes = [
{ m: 4, x: 0, y: 0, vx: 0, vy: -1 / Math.sqrt(2) },
{ m: 4, x: 1, y: 0, vx: 0, vy: 1 / Math.sqrt(2) },
{
m: 0.0000001,
x: 1 / 2 + 0.001,
y: Math.sqrt(3) / 2,
vx: -Math.sqrt(3 / 2),
vy: 0
}
];
nodes.xmin = -0.2;
nodes.xmax = 1.2;
nodes.ymin = -0.2;
nodes.ymax = 1;
nodes.steps_per_frame = 20;
nodes.dt = 0.0001;
nodes.delay = 5;
nodes.period = 4 * 480;
return nodes;
})();
// Figure 8
configurations.figure8 = (function() {
let nodes = [
{
m: 1,
x: -0.97000436,
y: 0.24308753,
vx: 0.4662036850,
vy: 0.4323657300
},
{ m: 1, x: 0, y: 0, vx: -0.93240737, vy: -0.86473146 },
{
m: 1,
x: 0.97000436,
y: -0.24308753,
vx: 0.4662036850,
vy: 0.4323657300
}
];
nodes.xmin = -1.2;
nodes.xmax = 1.2;
nodes.ymin = -0.6;
nodes.ymax = 0.6;
nodes.steps_per_frame = 1;
nodes.track_length = 150;
nodes.dt = 0.01;
nodes.delay = 0;
return nodes;
})();
// Sun, Planet, Moon (seems stable)
configurations.sunPlanetMoon = [
{ m: 4, x: 0, y: 0, vx: 0, vy: -0.5 },
{ m: 0.00001, x: 4 / 5, y: 0, vx: 0, vy: 0 },
{ m: 1, x: 1, y: 0, vx: 0, vy: 2 }
];
configurations.sunPlanetMoon.xmin = -1.4;
configurations.sunPlanetMoon.xmax = 1.4;
configurations.sunPlanetMoon.ymin = -1.4;
configurations.sunPlanetMoon.ymax = 1.4;
configurations.sunPlanetMoon.steps_per_frame = 5;
configurations.sunPlanetMoon.dt = 0.001;
configurations.sunPlanetMoon.delay = 5;
// http://three-body.ipb.ac.rs/bsol.php?id=0
configurations.threeBody0 = (function() {
let nodes = [
{ m: 1, x: -0.9892620043, y: 0, vx: 0, vy: 1.9169244185 },
{ m: 1, x: 2.2096177241, y: 0, vx: 0, vy: 0.1910268738 },
{ m: 1, x: -1.2203557197, y: 0, vx: 0, vy: -2.1079512924 }
];
nodes.xmin = -2.3;
nodes.xmax = 2.3;
nodes.ymin = -1;
nodes.ymax = 1;
nodes.steps_per_frame = 1;
nodes.track_length = 150;
nodes.dt = 0.01;
nodes.delay = 0;
return nodes;
})();
// http://three-body.ipb.ac.rs/bsol.php?id=11
configurations.threeBody11 = (function() {
let nodes = [
{ m: 1, x: -0.337076702, y: 0, vx: 0, vy: 0.9174260238 },
{ m: 1, x: 2.1164029743, y: 0, vx: 0, vy: -0.0922665014 },
{ m: 1, x: -1.7793262723, y: 0, vx: 0, vy: -0.8251595224 }
];
nodes.xmin = -2.3;
nodes.xmax = 2.3;
nodes.ymin = -2.3;
nodes.ymax = 2.3;
nodes.steps_per_frame = 3;
nodes.track_length = 150;
nodes.dt = 0.01;
nodes.delay = 0;
return nodes;
})();
// http://three-body.ipb.ac.rs/bsol.php?id=18
configurations.threeBody18 = (function() {
let nodes = [
{ m: 1, x: 0.8920281421, y: 0, vx: 0, vy: 0.9957939373 },
{ m: 1, x: -0.6628498947, y: 0, vx: 0, vy: -1.6191613336 },
{ m: 1, x: -0.2291782474, y: 0, vx: 0, vy: 0.6233673964 }
];
nodes.xmin = -1.2;
nodes.xmax = 1.2;
nodes.ymin = -1;
nodes.ymax = 1;
nodes.steps_per_frame = 1;
nodes.track_length = 150;
nodes.dt = 0.01;
nodes.delay = 0;
return nodes;
})();
// 3-4-5 triangle
configurations.threeFourFive = (function() {
let nodes = [
{ m: 3, x: 1, y: 3, vx: 0, vy: 0 },
{ m: 4, x: -2, y: -1, vx: 0, vy: 0 },
{ m: 5, x: 1, y: -1, vx: 0, vy: 0 }
];
nodes.xmin = -6;
nodes.xmax = 6;
nodes.ymin = -6;
nodes.ymax = 6;
nodes.aspect = (nodes.ymax - nodes.ymin) / (nodes.xmax - nodes.xmin);
nodes.steps_per_frame = 1000;
nodes.dt = 0.00005;
nodes.delay = 1;
return nodes;
})();
configurations.circle7 = circular_configuration(7);
configurations.semiRandom = (function() {
let n1 = 3;
let s1 = 0.2083785248428932;
let n2 = 4;
let s2 = 0.3889050449181679;
let n3 = 3;
let s3 = 0.9968774001773553;
let n4 = 4;
let s4 = 0.2990274913092489;
let nodes = random_configuration(n4, s4);
return nodes;
})();
return configurations;
}