Page 1 of 2

I can't think of a pun goes the asteroids (vary e)

Posted: Fri Mar 28, 2014 5:41 pm
by A Random Player
Inspired by viewtopic.php?f=7&t=103&start=30#p1858

http://codepad.org/BZ6ydzbw

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceG: -2,Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: 1000,c: 1], [x0: 50,y0: 0,vx: 0,vy: 5.47722557505,t0: 0,who: 3,m: 0,c: 0], [x0: 75,y0: 0,vx: 0,vy: 4.08248290464,t0: 0,who: 3,m: 0,c: 0], [x0: 100,y0: 0,vx: 0,vy: 3.16227766017,t0: 0,who: 3,m: 0,c: 0], [x0: 125,y0: 0,vx: 0,vy: 2.44948974278,t0: 0,who: 3,m: 0,c: 0], [x0: 150,y0: 0,vx: 0,vy: 1.82574185835,t0: 0,who: 3,m: 0,c: 0]
Short. Generate orbits of equal SMAs but varying eccentricities. Ptolemy would have fun.

More:

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceG: -2,Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: 1000,c: 1], [x0: 25,y0: 0,vx: 0,vy: 8.36660026534,t0: 0,who: 3,m: 0,c: 0], [x0: 50,y0: 0,vx: 0,vy: 5.47722557505,t0: 0,who: 3,m: 0,c: 0], [x0: 75,y0: 0,vx: 0,vy: 4.08248290464,t0: 0,who: 3,m: 0,c: 0], [x0: 100,y0: 0,vx: 0,vy: 3.16227766017,t0: 0,who: 3,m: 0,c: 0], [x0: 125,y0: 0,vx: 0,vy: 2.44948974278,t0: 0,who: 3,m: 0,c: 0], [x0: 150,y0: 0,vx: 0,vy: 1.82574185835,t0: 0,who: 3,m: 0,c: 0], [x0: 175,y0: 0,vx: 0,vy: 1.19522860933,t0: 0,who: 3,m: 0,c: 0]

Re: I can't think of a pun goes the asteroids (vary e)

Posted: Fri Mar 28, 2014 5:52 pm
by testtubegames
Wow, those are gorgeous!

I'm really impressed. *This* is why I add features to the simulator. You all just run wild with them.

Re: I can't think of a pun goes the asteroids (vary e)

Posted: Fri Mar 28, 2014 5:59 pm
by A Random Player
Made another one: 10-190, step = 0

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceG: -2,Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: 1000,c: 1], [x0: 10,y0: 0,vx: 0,vy: 13.7840487521,t0: 0,who: 3,m: 0,c: 0], [x0: 20,y0: 0,vx: 0,vy: 9.48683298051,t0: 0,who: 3,m: 0,c: 0], [x0: 30,y0: 0,vx: 0,vy: 7.52772652709,t0: 0,who: 3,m: 0,c: 0], [x0: 40,y0: 0,vx: 0,vy: 6.32455532034,t0: 0,who: 3,m: 0,c: 0], [x0: 50,y0: 0,vx: 0,vy: 5.47722557505,t0: 0,who: 3,m: 0,c: 0], [x0: 60,y0: 0,vx: 0,vy: 4.8304589154,t0: 0,who: 3,m: 0,c: 0], [x0: 70,y0: 0,vx: 0,vy: 4.30945803686,t0: 0,who: 3,m: 0,c: 0], [x0: 80,y0: 0,vx: 0,vy: 3.87298334621,t0: 0,who: 3,m: 0,c: 0], [x0: 90,y0: 0,vx: 0,vy: 3.4960294939,t0: 0,who: 3,m: 0,c: 0], [x0: 100,y0: 0,vx: 0,vy: 3.16227766017,t0: 0,who: 3,m: 0,c: 0], [x0: 110,y0: 0,vx: 0,vy: 2.86038776774,t0: 0,who: 3,m: 0,c: 0], [x0: 120,y0: 0,vx: 0,vy: 2.58198889747,t0: 0,who: 3,m: 0,c: 0], [x0: 130,y0: 0,vx: 0,vy: 2.32047740446,t0: 0,who: 3,m: 0,c: 0], [x0: 140,y0: 0,vx: 0,vy: 2.07019667803,t0: 0,who: 3,m: 0,c: 0], [x0: 150,y0: 0,vx: 0,vy: 1.82574185835,t0: 0,who: 3,m: 0,c: 0], [x0: 160,y0: 0,vx: 0,vy: 1.58113883008,t0: 0,who: 3,m: 0,c: 0], [x0: 170,y0: 0,vx: 0,vy: 1.32842232831,t0: 0,who: 3,m: 0,c: 0], [x0: 180,y0: 0,vx: 0,vy: 1.05409255339,t0: 0,who: 3,m: 0,c: 0], [x0: 190,y0: 0,vx: 0,vy: 0.72547625011,t0: 0,who: 3,m: 0,c: 0]
It created something slightly inappropriate/immature for some selected asteroids. :P

Edit: I generated a 2-198 step 2, expecting it to look horrible.
IT WAS AWESOME.

Re: I can't think of a pun goes the asteroids (vary e)

Posted: Fri Mar 28, 2014 7:24 pm
by wtg62
Sweet. These'll be easy to make now!
Although... less weird shapes :c
Now if only we could specify the longitude of the periapsis...

The first code is awesome... clicking the center one gives curves and lines! Awesome formations!
Ptolemy, goes the asteroids! or...
Wobble wobble wobble, goes the asteroids!

After speeding up time excessively... I noticed it isn't perfect. It's close enough though.

Re: I can't think of a pun goes the asteroids (vary e)

Posted: Fri Mar 28, 2014 8:35 pm
by A Random Player
wtg62 wrote:Sweet. These'll be easy to make now!
Although... less weird shapes :c
Now if only we could specify the longitude of the periapsis...

The first code is awesome... clicking the center one gives curves and lines! Awesome formations!
Ptolemy, goes the asteroids! or...
Wobble wobble wobble, goes the asteroids!

After speeding up time excessively... I noticed it isn't perfect. It's close enough though.
It should be perfect (notice all the decimals?). I think timewarp reduces accuracy of the simulation (multiplies timestep instead of looping calculations?).

Re: I can't think of a pun goes the asteroids (vary e)

Posted: Mon Mar 31, 2014 10:36 pm
by wtg62
Timewarp doesn't seem to decrease accuracy significantly.

Re: I can't think of a pun goes the asteroids (vary e)

Posted: Mon Mar 31, 2014 10:41 pm
by exfret
wtg62 wrote:Timewarp doesn't seem to decrease accuracy significantly.
It does. I just found a good demonstration of this, but I can't post it right now.

Re: I can't think of a pun goes the asteroids (vary e)

Posted: Tue Apr 01, 2014 11:07 am
by testtubegames
A Random Player wrote:I think timewarp reduces accuracy of the simulation (multiplies timestep instead of looping calculations?).
That's right. It simply increases the timestep. If people want, I might be able to make it a bit more nuanced, though. Because if you have 3000 planets, it won't be able to do 10x the calculations per frame. But if you have just 5 planets, then it *should* be able to, and you'd retain the accuracy.

I'll note, though, that for planets that are far enough away from each other, the increased timestep doesn't introduce too much error. Or, at least, I was surprised how well asteroids orbited a star even at 100x. (The orbit-redraw when you zoom, however, is hilarious. :) Needs a bit o' work.)

Re: I can't think of a pun goes the asteroids (vary e)

Posted: Tue Apr 01, 2014 4:28 pm
by A Random Player
testtubegames wrote:
A Random Player wrote:I think timewarp reduces accuracy of the simulation (multiplies timestep instead of looping calculations?).
That's right. It simply increases the timestep. If people want, I might be able to make it a bit more nuanced, though. Because if you have 3000 planets, it won't be able to do 10x the calculations per frame. But if you have just 5 planets, then it *should* be able to, and you'd retain the accuracy.

I'll note, though, that for planets that are far enough away from each other, the increased timestep doesn't introduce too much error. Or, at least, I was surprised how well asteroids orbited a star even at 100x. (The orbit-redraw when you zoom, however, is hilarious. :) Needs a bit o' work.)
I suggest (like in KSP) two timewarps instead: Looping Warp (looping calculations so no accuracy is lost) and Timestep Warp (increasing timestep). Looping is good to run a configuration (or skip a beginning) without loss of accuracy, and Timestep to run a very large system that doesn't need accurary but runs slowly.
Maybe two sliders would be simple for the interface.

Re: I can't think of a pun goes the asteroids (vary e)

Posted: Tue Apr 01, 2014 6:02 pm
by wtg62
But how KSP does it's 'accurate' simulation, is completely different.
It only moves objects on-rails, it doesn't loop all the calculations in what you described as a looping-warp. All it really runs off-rails is collisions, encounters, etc.
Even then, it isn't too accurate, as a very high time-warp can fling you out of a bodies SOI for no apparent reason.

The actual time-step mode, does degrade accuracy (way more severe than GSim does), but calculates everything dynamically.