Page 3 of 3

Re: Interesting gravity laws

Posted: Sun Jul 20, 2014 8:12 pm
by Stargate38
Here's a good one: (e*r)^(e*r)/(abs(e^(e*r)-(e*r)^(e))+0.05)+0.15/r^3. At close distances, it acts like 1/r^3. But as you head out, gravity suddenly increases, maxing out at r=1. Head even further out and gravity decreases, then increases in proportion to e^(r*ln(r))=r^r, which is between exponential and double exponential.

Watch this at 1x:

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceGr: (e*r)^(e*r)/(abs(e^(e*r)-(e*r)^(e))+0.05)+0.15/r^3,Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: 50,y0: 0,vx: 0,vy: 5.9,t0: 0,who: 2,m: 4,c: 0], [x0: 0,y0: 10,vx: 0,vy: 0,t0: 0,who: 1,m: 1000,c: 1], [x0: 8.55,y0: -5,vx: 0,vy: 0,t0: 0,who: 1,m: 1000,c: 1], [x0: -8.55,y0: -5,vx: 0,vy: 0,t0: 0,who: 1,m: 1000,c: 1], [x0: 0,y0: 0,vx: 0,vy: 0,t0: 0,who: 1,m: 0,c: 1], [x0: -30,y0: -40,vx: 4.72,vy: -3.54,t0: 0,who: 2,m: 3,c: 1], [x0: -30,y0: 40,vx: -4.72,vy: -3.54,t0: 0,who: 2,m: 3,c: 1], [x0: 75,y0: 0,vx: 0,vy: 17.6358041855991,t0: 0,who: 2,m: 10,c: 0]
Notice that the planets start out in nice circular orbits, then chaos causes the inner ones to suddenly (and repeatedly) plunge into the triple suns, coming out on random looking trajectories. The outer planet (which has a shorter orbital period) eventually collides with them and ends up on a stable, flowerlike orbit.

Re: Interesting gravity laws

Posted: Wed Aug 13, 2014 12:03 pm
by testtubegames
Huh, that's cool how the outermost planet really just keeps doing its own thing. All the other ones flew around pretty chaotically, but that one just kept circling and circling (with minor wobbles here and there). I suppose it just had too much kinetic energy to get pulled any closer to the center, maybe? (I was surprised to see another planet cross the stable planet's path...so it's not just it's position that keeps it safe, conservation of angular momentum must come into play)

Re: Interesting gravity laws

Posted: Sun Dec 21, 2014 9:07 pm
by AlternateGravity
sin(4*(log(r)/log(1.6)))/(r^3) produces star shaped orbits.
Asteroid in Star shaped orbit.png
Asteroid in Star shaped orbit.png (61.81 KiB) Viewed 15624 times
I found that it's possible for a moon to orbit a planet using this law.
sin(4(log(r)log(1.6)))(r^3).png
sin(4(log(r)log(1.6)))(r^3).png (106.53 KiB) Viewed 15624 times