Interesting gravity laws

What did you draw?
User avatar
wtg62
Posts: 174
Joined: Mon Jan 27, 2014 11:30 pm
Location: Texas, United States

Interesting gravity laws

Post by wtg62 »

Share interesting gravity laws you found, here!

I'm really trying to look for some gravity laws that are rather weird, unique, and of course have awesome looking results.

Here's a list of some I found, and some we already know about.
  • r^-2 - Default *not a yawn, because conic sections aren't boring*
  • r^-3 - Spiral 'orbits'. Stable orbits are difficult to create without holding 'c'.
  • r^0 - Force is always 1. Infact, you can just write this as 1.
  • r - All orbits are stable. Can also be inputted as r^1.
  • r^x - Where x is a positive number that is not 1 or 0. Objects are pulled with greater force the further away they are from each-other, allowing star/flower shaped orbits to be made. Try r^100, too.
  • tan(r) - Crazy orbit shapes (when there is more than 1 source of gravity), planets oscillate back and forth. They really are fascinating.[/b]
  • tan(1/r) - Trajectory predictions are weird, and do not predict what'll actually happen. Things are flung about, everywhere.[/b]
  • sec(r) - Similar to tan(r). Goes crazy when asymptotes are reached (Multiples of π, I believe).
  • r-1 - Caught by A Random Player. Objects attract and repel each-other at certain distances, meaning they'll oscillate.
  • r-1.1 - Like r-1, only different.
  • abs(tan(r)) - Similar to tan(r), just that the force of gravity is never negative. (*boing* *boing*)
  • tan(tan(r)) - Unpredictable results may occur. Objects are pulled about in random directions if more than one object with mass is present.
  • sin(tan(r)) - Like tan(tan(r)) except a bit more 'precise' as exfret said.
  • tan(sin(r)) & tan(cos(r)) - Try giving r a coefficient and this'll be more effective. More oscillating.
  • 10*tan(r-pi/2) - Springy!
  • cos(r) - Distant orbits are springy, while close ones resemble r^0.
  • sin(r) - Wobbly orbits.
  • log(r) - Flower orbits, *yawn*
  • (e*r)^(e*r)/(abs(e^(e*r)-(e*r)^(e))+0.05)+0.15/r^3 - Try it for yourself... Thanks for finding it, Stargate!
(Edited because exfret pointed out a lot of stuffs! Thanks exfret! :P)

Hint for finding interesting laws: r is the distance an object is from another object.
Last edited by wtg62 on Wed Sep 03, 2014 7:11 pm, edited 31 times in total.
This message has been brought to you by wtg62, duh!
A Random Player
Posts: 523
Joined: Mon Jun 03, 2013 4:54 pm

Re: Interesting gravity laws

Post by A Random Player »

Circular orbits at sin(1/r) are possible, just the most common ones are probably unstable:

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceGr: sin(1/r),Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: -27.5,y0: 35,vx: 0,vy: 0,t0: 0,who: 2,m: 1000000,c: 1], [x0: 30,y0: 75,vx: -47.5489,vy: 68.35155,t0: 36.8,who: 3,m: 0,c: 0]
Same for cos(1/r):

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceGr: cos(1/r),Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: -115,y0: 50,vx: 0,vy: -0.03,t0: 0,who: 2,m: 1000000,c: 1], [x0: 50,y0: 50,vx: 0,vy: 116.4231,t0: 0,who: 3,m: 0,c: 0]
Here's a thing in r-1:

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceGr: r-1,Qual: 1,Zoom: 1,xSet: -14.97396,ySet: -37.10938], [x0: -100,y0: 100,vx: 0,vy: 0,t0: 0,who: 2,m: 1000,c: 1], [x0: 0,y0: 100,vx: 0,vy: 0,t0: 12,who: 2,m: 1000,c: 1], [x0: -47.5,y0: 182.5,vx: 0,vy: 0,t0: 47.6,who: 2,m: 1000,c: 1], [x0: -47.5,y0: 25,vx: 0,vy: 0,t0: 76.8,who: 2,m: 1000,c: 1]
Because F=0 at r=1, any configuration with all unit distances is stable. (That means only a line segment and a triangle. If the sim extends into 3D space, it also includes a tetrahedron.)
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
User avatar
wtg62
Posts: 174
Joined: Mon Jan 27, 2014 11:30 pm
Location: Texas, United States

Re: Interesting gravity laws

Post by wtg62 »

Haha, r-1 is awesome!
I'll fix sin(1/r) and cos(1/r)

Also, check this out. r-1 binary system.

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceGr: r-1,Qual: 1,Zoom: 1,xSet: 0,ySet: 0], [x0: -52.5,y0: -10,vx: 0,vy: 0,t0: 0,who: 2,m: 100,c: 2], [x0: -20,y0: 10,vx: -0.99,vy: 0.96,t0: 0,who: 2,m: 100,c: 2]
Be sure to use the CoM button.
This message has been brought to you by wtg62, duh!
dolphin558
Posts: 1
Joined: Wed Apr 30, 2014 3:47 am

Re: Interesting gravity laws

Post by dolphin558 »

Simple but beautiful

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceG: 2,Qual: 1,Zoom: 0.16,xSet: -218.75,ySet: 541.05], [x0: 62.34,y0: -417.57,vx: 0,vy: 0,t0: 0,who: 1,m: 1932], [x0: 1091.37,y0: -907.39,vx: 16.91,vy: 6.7,t0: 199.8,who: 2,m: 100]
User avatar
wtg62
Posts: 174
Joined: Mon Jan 27, 2014 11:30 pm
Location: Texas, United States

Re: Interesting gravity laws

Post by wtg62 »

dolphin558 wrote:Simple but beautiful

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceG: 2,Qual: 1,Zoom: 0.16,xSet: -218.75,ySet: 541.05], [x0: 62.34,y0: -417.57,vx: 0,vy: 0,t0: 0,who: 1,m: 1932], [x0: 1091.37,y0: -907.39,vx: 16.91,vy: 6.7,t0: 199.8,who: 2,m: 100]
Welcome to TTG, Dolphin!
We already do happen to know about the r^2 law, it really is a marvelous law, though.
This message has been brought to you by wtg62, duh!
User avatar
testtubegames
Site Admin
Posts: 1148
Joined: Mon Nov 19, 2012 7:54 pm

Re: Interesting gravity laws

Post by testtubegames »

dolphin558 wrote:Simple but beautiful
Hey dolphin! I'll second that welcome. Thanks for sharing your creation with us!

I encourage you to check out the new version of the sim (unity, not flash), where you can try out a whole bunch of new force laws for gravity. We live in a world with a 1/r^2 force law (gravity gets weak quickly as two things get far apart) -- but in the sim we can change that. Why? Because SCIENCE!
User avatar
wtg62
Posts: 174
Joined: Mon Jan 27, 2014 11:30 pm
Location: Texas, United States

Re: Interesting gravity laws

Post by wtg62 »

Yes... defy more physics, Dolphin!
Marvelous creations will be made!
This message has been brought to you by wtg62, duh!
AlternateGravity
Posts: 80
Joined: Thu May 15, 2014 5:45 pm

Re: Interesting gravity laws

Post by AlternateGravity »

I first looked at the orbits of planets using different inverse laws.
1/r^2 produces elliptical orbits and seems to be the only inverse law to produce elliptical orbits.
1/r produces flower shaped orbits.
I tried to get stable orbits with 1/r^3 but I couldn't :(
r^3 produces flower shaped orbits and the further away the planet is from its star the faster it moves as the greater the gravitational attraction.
I was able to get stable orbits in r^0 easily.
I also decided to try fractional inverse laws between 1/r^2 and 1/r^2 to see if they produce stable orbits.
1/r^2.5 easily produces stable orbits that form the shape of a flower.
1/r^2.6 produces basically the same results as 1/r^2.5.
With 1/r^2.9 it's possible to produce stable orbits but somewhat difficult. The planet spirals in to its star for about one cycle and then spirals back out for another cycle before the process repeats itself. Once in a stable orbit a planet can stay in that orbit forever. I sent an asteroid in to try to knock a planet out of it's orbit but it remained in a stable orbit even after the asteroid crossed it's orbit.
1/r^2.95 produces basically the same result as 1/r^2.9 but it's harder to produce stable orbits using it.

Next I tried making solar systems using the laws that produced stable orbits.
I made a solar system of three planets using 1/r and it remained stable for several hours before the inner and middle planet started crossing each others orbits and the inner planet crashed into its star.
I produced a solar system using r^0 and r^3 and in both cases I was able to produce solar systems that seemed stable.

I also tried dropping planets through their star from several stellar distances away using different inverse laws to see if it would produce harmonic motion.
1/r^2, r^3, r^0, 1/r^1 all produce harmonic motion when a planet is dropped through its star. The planet just moves back and forth through its star repeatedly with the same amplitude.
When a planet is dropped through its star using 1/r^3 the gravity of the star accelerates it to escape velocity so that the planet shoots off into space.
When a planet is dropped through its star using 1/r^2.5 the planet moves farther and farther each time it falls through its star until eventually it moves far enough that it stops falling through its star.
The fact that dropping a planet through its star using 1/r^2, r^3, r^0, 1/r^1 produces harmonic motion means that using these inverse laws it only takes one degree of freedom to produce harmonic motion. The fact that dropping a planet through its star using 1/r^2.5 does not produce harmonic motion but stable orbits are possible using 1/r^2.5 means that it takes two degrees of freedom to produce harmonic motion using 1/r^2.5 to produce harmonic motion. So different inverse laws require different degrees of freedom to produce harmonic motion.
Gravitons would be my favorite particle as their existence could prove extra dimensions.
A Random Player
Posts: 523
Joined: Mon Jun 03, 2013 4:54 pm

Re: Interesting gravity laws

Post by A Random Player »

AlternateGravity wrote:I first looked at the orbits of planets using different inverse laws.
1/r^2 produces elliptical orbits and seems to be the only inverse law to produce elliptical orbits.
Well, there is r, but those are centered at the center instead of a focus.
1/r produces flower shaped orbits.
I tried to get stable orbits with 1/r^3 but I couldn't :(
r^3 produces flower shaped orbits and the further away the planet is from its star the faster it moves as the greater the gravitational attraction.
Yep, most r^big number laws do that. (There was a discussion on r^100 somewhere...)
I was able to get stable orbits in r^0 easily.
I also decided to try fractional inverse laws between 1/r^2 and 1/r^2 to see if they produce stable orbits.
1/r^2.5 easily produces stable orbits that form the shape of a flower.
1/r^2.6 produces basically the same results as 1/r^2.5.
With 1/r^2.9 it's possible to produce stable orbits but somewhat difficult. The planet spirals in to its star for about one cycle and then spirals back out for another cycle before the process repeats itself. Once in a stable orbit a planet can stay in that orbit forever. I sent an asteroid in to try to knock a planet out of it's orbit but it remained in a stable orbit even after the asteroid crossed it's orbit.
1/r^2.95 produces basically the same result as 1/r^2.9 but it's harder to produce stable orbits using it.
Yeah, these are quite fun and simple (they can even be viewed in the old simulator!). But asteroids have 0 mass, so they don't affect anything. You should use another, smaller, planet instead.
Next I tried making solar systems using the laws that produced stable orbits.
I made a solar system of three planets using 1/r and it remained stable for several hours before the inner and middle planet started crossing each others orbits and the inner planet crashed into its star.
I produced a solar system using r^0 and r^3 and in both cases I was able to produce solar systems that seemed stable.

I also tried dropping planets through their star from several stellar distances away using different inverse laws to see if it would produce harmonic motion.
1/r^2, r^3, r^0, 1/r^1 all produce harmonic motion when a planet is dropped through its star. The planet just moves back and forth through its star repeatedly with the same amplitude.
When a planet is dropped through its star using 1/r^3 the gravity of the star accelerates it to escape velocity so that the planet shoots off into space.
When a planet is dropped through its star using 1/r^2.5 the planet moves farther and farther each time it falls through its star until eventually it moves far enough that it stops falling through its star.
The fact that dropping a planet through its star using 1/r^2, r^3, r^0, 1/r^1 produces harmonic motion means that using these inverse laws it only takes one degree of freedom to produce harmonic motion. The fact that dropping a planet through its star using 1/r^2.5 does not produce harmonic motion but stable orbits are possible using 1/r^2.5 means that it takes two degrees of freedom to produce harmonic motion using 1/r^2.5 to produce harmonic motion. So different inverse laws require different degrees of freedom to produce harmonic motion.
Technically 1/r^2 and 1/r^2.5 should not produce sensible motion, since both their integrals around 0 are infinity. But you can intuitively visualize that due to conservation of energy and that other calculus thingy that periodic motion is possible. However Andy modeled two objects touching each other as a ∝r force to avoid infinities, so the lack of repeating in 1/r^2.5 must be to numerical integration.
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
exfret
Posts: 585
Joined: Sun Jul 28, 2013 8:40 pm

Re: Interesting gravity laws

Post by exfret »

wtg62 wrote:r^-2 - Default *yawn*
Oh, come on, you can do better than that! Conic sections, closed orbits, stars at foci, our universe's law... Say something about it other than "yawn"!
wtg62 wrote:r^-3 - Spiral 'orbits'.
Also, stable orbits are impossible.
wtg62 wrote:r^0 - Stable orbits are impossible.
Also can be written as "1" (or any other constant). There must be something special about this gravity law besides that...
wtg62 wrote:r - All orbits are stable. Can also be inputted as r^1.
Stars are ellipses' centers. Harmonic motion. So on.
wtg62 wrote:r^x - Where x is a positive number more than 1. Objects are pulled with greater force the further away they are from each-other, allowing star/flower shaped orbits to be made.
x just has to be a positive number. It doesn't have to be greater than 1. Also, I've noticed that flower-shaped orbits are formed with pretty much every gravity law. I'm just wondering whats special about them.
wtg62 wrote:tan(r) - Crazy orbit shapes, planets oscillate back and forth. They really are fascinating. Can be written as sin(r)/cos(r)
They're actually not that crazy (unless you send it into one of the asymptotes).
wtg62 wrote:sin(1/r) - Creates flower patterns.
Like I said, a bunch of stuff creates flower patterns. Also note how it gets crazier the closer you are to the star.
wtg62 wrote:cos(1/r) - Similar to sin(1/r), just more extreme.
How is it more extreme?
wtg62 wrote:tan(1/r) - Trajectory predictions are weird, and do not predict what'll actually happen. Things are flung about, everywhere. Can be written as sin(1/r)/cos(1/r)
I don't have much to say about this.
wtg62 wrote:sec(r) - Similar to tan(r), although shapes can be a little more weird. Can be written as 1/cos(r).
How can they be weirder? It's not very similar to tan(r) either in terms of orbits except for the flower shapes, which are really common anyways. Also, objects can't help but hit the asymptotes unless they have enough motion in one of the areas where secant is positive, so this is a good law to see some of the areas where the GSim isn't so precise (also see "Strange oscillations": viewtopic.php?f=7&t=107).
wtg62 wrote:r-1 - Caught by A Random Player. Objects attract and repel each-other at certain distances, meaning they'll go back and forth.
Also, what about other polynomial functions? It could be really cool seeing how objects attract one instant and repel the next. For that matter, all rational functions might be cool studying.
wtg62 wrote:abs(tan(r)) - Similar to tan(r), just that the force of gravity is never negative. (*boing* *boing*)
I'd expect a lot of objects to fall into the asymptotes without the negative force acting as a buffer.
wtg62 wrote:tan(tan(r)) - Unpredictable results may occur. Objects are pulled about in random directions if more than one object with mass is present.
Hmm, interesting. You could also do sin(tan(r)), which would do the same thing, but without the infinite gravities, so it would be more precise.
wtg62 wrote:tan(sin(r)) & tan(cos(r)) - Try giving r a coefficient and this'll be more effective. Basically certain distances pull your objects or push them.
This is basically the same as sin(r) and cos(r), except it's pointier. The coefficient thing holds true for all trigonometric functions. You can also put a coefficient by cos(r), and the higher it is, the crazier. π/2 is the point at which you get infinities.
ARP wrote:(That means only a line segment and a triangle. If the sim extends into 3D space, it also includes a tetrahedron.)
Wait, so how would you get a triangle?
AlternateGravity wrote:1/r^2 produces elliptical orbits and seems to be the only inverse law to produce elliptical orbits.
It also produces other conic sections, like parabolas and hyperbolas.
AlternateGravity wrote:I was able to get stable orbits in r^0 easily.
Hmm... Wtg said it was impossible to get r^0 to produce stable orbits. I'm confused. :?
Nobody ever notices my signature. ):
Post Reply