Unstable Systems

What did you draw?
Post Reply
A Random Player
Posts: 523
Joined: Mon Jun 03, 2013 4:54 pm

Unstable Systems

Post by A Random Player »

Most stable (aka one orbit)

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceGr: r^(-2),Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: -57.8188232843091,y0: 0,vx: 0,vy: -5.78188232843091,t0: 0,who: 4,m: 10000,c: 1], [x0: 43.9523760122891,y0: 0,vx: 0,vy: 4.39523760122891,t0: 0,who: 4,m: 5000,c: 1], [x0: 119.475461343593,y0: 0,vx: 0,vy: 11.9475461343593,t0: 0,who: 4,m: 3000,c: 1], [x0: 169.726251851982,y0: 0,vx: 0,vy: 16.9726251851982,t0: 0,who: 4,m: 0.000001,c: 1]
Stuff

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceGr: r^(-2),Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: -42.7472783008521,y0: 0,vx: 0,vy: -4.27472783008521,t0: 0,who: 4,m: 1200,c: 1], [x0: -12.8953262440575,y0: 0,vx: 0,vy: -1.28953262440575,t0: 0,who: 4,m: 100,c: 1], [x0: -1.19261229872517,y0: 0,vx: 0,vy: -0.119261229872517,t0: 0,who: 4,m: 100,c: 1], [x0: 28.1670384612716,y0: 0,vx: 0,vy: 2.81670384612716,t0: 0,who: 4,m: 1200,c: 1], [x0: 63.3058991884697,y0: 0,vx: 0,vy: 6.33058991884697,t0: 0,who: 4,m: 100,c: 1], [x0: 78.5381263161541,y0: 0,vx: 0,vy: 7.85381263161541,t0: 0,who: 4,m: 100,c: 1], [x0: 93.3610681194971,y0: 0,vx: 0,vy: 9.33610681194971,t0: 0,who: 4,m: 50,c: 1]
Lightsaber...

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceGr: r^(-2),Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: -54.1035551523054,y0: 0,vx: 0,vy: -5.41035551523054,t0: 0,who: 4,m: 1200,c: 1], [x0: -26.4581629950747,y0: 0,vx: 0,vy: -2.64581629950747,t0: 0,who: 4,m: 100,c: 1], [x0: -15.7269722927006,y0: 0,vx: 0,vy: -1.57269722927006,t0: 0,who: 4,m: 100,c: 1], [x0: 10.8099184487373,y0: 0,vx: 0,vy: 1.08099184487373,t0: 0,who: 4,m: 1200,c: 1], [x0: 36.3273643719391,y0: 0,vx: 0,vy: 3.63273643719391,t0: 0,who: 4,m: 100,c: 1], [x0: 45.8476924853279,y0: 0,vx: 0,vy: 4.58476924853279,t0: 0,who: 4,m: 100,c: 1], [x0: 54.9107932738354,y0: 0,vx: 0,vy: 5.49107932738354,t0: 0,who: 4,m: 100,c: 1], [x0: 64.0292205862128,y0: 0,vx: 0,vy: 6.40292205862128,t0: 0,who: 4,m: 100,c: 1], [x0: 73.492305300818,y0: 0,vx: 0,vy: 7.3492305300818,t0: 0,who: 4,m: 100,c: 1], [x0: 83.6101897903454,y0: 0,vx: 0,vy: 8.36101897903454,t0: 0,who: 4,m: 100,c: 1], [x0: 94.8913883594834,y0: 0,vx: 0,vy: 9.48913883594834,t0: 0,who: 4,m: 100,c: 1], [x0: 108.597833178119,y0: 0,vx: 0,vy: 10.8597833178119,t0: 0,who: 4,m: 100,c: 1]
Constant spacing

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceGr: r^(-2),Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: -120,y0: 0,vx: 0,vy: -12,t0: 0,who: 4,m: 5460.11517186715,c: 1], [x0: -100,y0: 0,vx: 0,vy: -10,t0: 0,who: 4,m: -1254.83229384751,c: 1], [x0: -80,y0: 0,vx: 0,vy: -8,t0: 0,who: 4,m: 5305.77196969057,c: 1], [x0: -60,y0: 0,vx: 0,vy: -6,t0: 0,who: 4,m: -1281.66510076383,c: 1], [x0: -40,y0: 0,vx: 0,vy: -4,t0: 0,who: 4,m: 5311.61242524595,c: 1], [x0: -20,y0: 0,vx: 0,vy: -2,t0: 0,who: 4,m: -1269.91182591492,c: 1], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 4,m: 5319.30053238752,c: 1], [x0: 20,y0: 0,vx: 0,vy: 2,t0: 0,who: 4,m: -1269.91187816461,c: 1], [x0: 40,y0: 0,vx: 0,vy: 4,t0: 0,who: 4,m: 5311.61027125314,c: 1], [x0: 60,y0: 0,vx: 0,vy: 6,t0: 0,who: 4,m: -1281.66517613983,c: 1], [x0: 80,y0: 0,vx: 0,vy: 8,t0: 0,who: 4,m: 5305.77119566961,c: 1], [x0: 100,y0: 0,vx: 0,vy: 10,t0: 0,who: 4,m: -1254.83228533831,c: 1], [x0: 120,y0: 0,vx: 0,vy: 12,t0: 0,who: 4,m: 5460.1162719546,c: 1]
Constant mass

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceGr: r^(-2),Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: -57.7519135256547,y0: 0,vx: 0,vy: -5.77519135256547,t0: 0,who: 4,m: 100,c: 1], [x0: -40.7206615735301,y0: 0,vx: 0,vy: -4.07206615735301,t0: 0,who: 4,m: 100,c: 1], [x0: -26.2809674095875,y0: 0,vx: 0,vy: -2.62809674095876,t0: 0,who: 4,m: 100,c: 1], [x0: -12.9254773496687,y0: 0,vx: 0,vy: -1.29254773496687,t0: 0,who: 4,m: 100,c: 1], [x0: -0.00775414493629244,y0: 0,vx: 0,vy: -0.000775414493629244,t0: 0,who: 4,m: 100,c: 1], [x0: 12.909573931815,y0: 0,vx: 0,vy: 1.2909573931815,t0: 0,who: 4,m: 100,c: 1], [x0: 26.2649194550335,y0: 0,vx: 0,vy: 2.62649194550335,t0: 0,who: 4,m: 100,c: 1], [x0: 40.7044337930951,y0: 0,vx: 0,vy: 4.07044337930951,t0: 0,who: 4,m: 100,c: 1], [x0: 57.7364852040357,y0: 0,vx: 0,vy: 5.77364852040357,t0: 0,who: 4,m: 100,c: 1]
Generated in MSExcel with the Solver. That's why it's not very precise.
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
User avatar
testtubegames
Site Admin
Posts: 1148
Joined: Mon Nov 19, 2012 7:54 pm

Re: Unstable Systems

Post by testtubegames »

Whoa -- how on Earth...

I'd love to hear the process behind this. What were the calculations you did to get sets of whirling stars?
A Random Player
Posts: 523
Joined: Mon Jun 03, 2013 4:54 pm

Re: Unstable Systems

Post by A Random Player »

1. Realize that mathematically this is totally possible - Required acceleration goes up away from center, actual goes down away from center. There has to be an intersection. Similar for any star there - the accelerations can range from positive to negative inf, based on distances.
2. Realize that this would probably be unstable, but do it anyway
Spreadsheet consists of a big square that generates all the forces on all bodies (GMm/r^2). Make a list of sums, and find the actual acceleration of each body.
Calculate expected velocity based on position. (I guessed on this part.) Calculate required acceleration based on position and velocity.
Sum the squares of the differences of accelerations. Set solver to minimize this value by changing positions (fixing masses, or vice versa in one code).

So no solving equations manually, get the computer to do it all. Which means it's rather inaccurate.

I might upload the actual spreadsheet, but remember it's useless without enabling the solver.
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
Post Reply