We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1631918 commit 7cc2da4Copy full SHA for 7cc2da4
1 file changed
tools/icbuilder.py
@@ -216,4 +216,32 @@ def three_body_figure_eight(mass=1.0):
216
(x1, y1, 0.0, vx1, vy1, 0.0, m),
217
(x2, y2, 0.0, vx2, vy2, 0.0, m),
218
(x3, y3, 0.0, vx3, vy3, 0.0, m),
219
+ ]
220
+
221
+def four_body_cross(mass=1.0):
222
+ """
223
+ Symmetric four-body 'cross' choreography.
224
+ Four equal masses start on cardinal axes and orbit the barycenter.
225
226
227
+ m = mass
228
229
+ # Standard symmetric initial conditions (scaled for G = 1)
230
+ # Positions:
231
+ x1, y1 = 1.0, 0.0
232
+ x2, y2 = -1.0, 0.0
233
+ x3, y3 = 0.0, 1.0
234
+ x4, y4 = 0.0, -1.0
235
236
+ # Velocities chosen to produce the cross choreography
237
+ vx1, vy1 = 0.0, 0.5
238
+ vx2, vy2 = 0.0, -0.5
239
+ vx3, vy3 = -0.5, 0.0
240
+ vx4, vy4 = 0.5, 0.0
241
242
+ return [
243
+ (x1, y1, 0.0, vx1, vy1, 0.0, m),
244
+ (x2, y2, 0.0, vx2, vy2, 0.0, m),
245
+ (x3, y3, 0.0, vx3, vy3, 0.0, m),
246
+ (x4, y4, 0.0, vx4, vy4, 0.0, m),
247
]
0 commit comments