r^-3=/=(r^-3) in the simulation

What did you draw?
Post Reply
AlternateGravity
Posts: 72
Joined: Thu May 15, 2014 5:45 pm

r^-3=/=(r^-3) in the simulation

Post by AlternateGravity » Wed Dec 10, 2014 1:00 pm

I was using the simulator and found that when I put in r^-3 it did not produce stable orbits while when I put in (r^-3) it produced stable orbits even though r^-3 should be the same as (r^-3) as both are ways to express the inverse cube law. I was just wondering why is it that typing in r^-3 and (r^-3) produce different results when they are just different ways to express the same thing? Could you fix it so that they produce the same results as they're the same thing?
Gravitons would be my favorite particle as their existence could prove extra dimensions.

NealCruco
Posts: 197
Joined: Thu Mar 27, 2014 8:26 pm

Re: r^-3=/=(r^-3) in the simulation

Post by NealCruco » Wed Dec 10, 2014 3:26 pm

I could be wrong, but I think the parentheses change the order of operations used when evaluating whatever expression you put in. That leads to different results. (Andy, if I'm wrong, please tell me and show me why.)

exfret
Posts: 585
Joined: Sun Jul 28, 2013 8:40 pm

Re: r^-3=/=(r^-3) in the simulation

Post by exfret » Thu Dec 11, 2014 7:50 am

Well, it shouldn't change order of operations. My guess if it does is for some reason the parantheses might make it evaluate r^-, which it might interpret as r^-1, and then multiply by 3. Something like that. It would help a lot, though, if you could provide pictures of what you mean.
Nobody ever notices my signature. ):

User avatar
testtubegames
Site Admin
Posts: 1071
Joined: Mon Nov 19, 2012 7:54 pm

Re: r^-3=/=(r^-3) in the simulation

Post by testtubegames » Thu Dec 11, 2014 8:11 am

Hmm, that's strange. r^-3 and (r^-3) should give basically* the same result. I ran a test over here, myself, and with version 0.30.02 of the sim (now up on Humble), they both behaved the same. If you've got any particular examples where it gives a different result, that'd be helpful to tracking this down.

*Mathematically, they are equivalent. Programmatically, the sim treats power laws (simple r^x laws) and more complex laws differently -- to help avoid the lag you might expect with a law like tan(tan(tan(tan(tan(tan(r))))). I think those extra parenthesis might (not sure) activate complex law mode... though any difference would be very, very minimal.

AlternateGravity
Posts: 72
Joined: Thu May 15, 2014 5:45 pm

Re: r^-3=/=(r^-3) in the simulation

Post by AlternateGravity » Thu Dec 11, 2014 1:43 pm

I tried using the code "Gravity Fun at TestTubeGames.com: [ForceGr: r^-3], [x0: -125,y0: 0,vx: 0,vy: 0,t0: 0,who: 2,m: 1000,c: 2]" and got
r^-3.png
r^-3.png (271.09 KiB) Viewed 12362 times
using "Gravity Fun at TestTubeGames.com: [ForceGr: (r^-3)], [x0: -125,y0: 0,vx: 0,vy: 0,t0: 0,who: 2,m: 1000,c: 2]" I got
(r^-3).png
(r^-3).png (251.29 KiB) Viewed 12362 times
I know that if (r^-3) does not produce the same results as r^-3 then I can't really trust it when I simulate (2^-r)*(r^-3) as it requires parentheses around r^-3. Could someone who isn't having trouble with the parentheses run (2^-r)*(r^-3) in the simulation and let me know rather or not it produces stable orbits?

With the code "Gravity Fun at TestTubeGames.com: [ForceGr: (2^-r)*(r^-3)], [x0: -125,y0: 0,vx: 0,vy: 0,t0: 0,who: 2,m: 1000,c: 2]" for (2^-r)*(r^-3) I got
(2^-r)(r^-3).png
(2^-r)(r^-3).png (240.08 KiB) Viewed 12362 times
Gravitons would be my favorite particle as their existence could prove extra dimensions.

User avatar
testtubegames
Site Admin
Posts: 1071
Joined: Mon Nov 19, 2012 7:54 pm

Re: r^-3=/=(r^-3) in the simulation

Post by testtubegames » Thu Dec 11, 2014 3:20 pm

Ah, I think I've got it now.

The browser version of the game only includes r^x force laws. Nothing fancier. The downloadable version has everything (*,-,+,cos,^, and so on).

If the browser-sim detects a force law more complex than r^x, it defaults to r^-2, which explains the stable orbits you saw. Adding parenthesis is enough to trigger that "whoa, too complex" warning. If you got to the physics tab, you should see that the current force law written out.

Side note -- I'm pretty sure you've got the full version of the sim, too, AlternateGravity, but if not I'll PM you a key for it.

AlternateGravity
Posts: 72
Joined: Thu May 15, 2014 5:45 pm

Re: r^-3=/=(r^-3) in the simulation

Post by AlternateGravity » Thu Dec 11, 2014 3:44 pm

I don't think I have the full version of the sim. How do I get the full version?
Gravitons would be my favorite particle as their existence could prove extra dimensions.

User avatar
testtubegames
Site Admin
Posts: 1071
Joined: Mon Nov 19, 2012 7:54 pm

Re: r^-3=/=(r^-3) in the simulation

Post by testtubegames » Thu Dec 11, 2014 3:58 pm

Code sent via PM.

And if there are any other forum-goers here who want / have not yet received a free key for the GSim, let me know. I couldn't do this without you all!

AlternateGravity
Posts: 72
Joined: Thu May 15, 2014 5:45 pm

Re: r^-3=/=(r^-3) in the simulation

Post by AlternateGravity » Fri Dec 12, 2014 12:21 am

I tried using (2^-r)*(r^-3) using the full version and it did not produce stable orbits.
Gravitons would be my favorite particle as their existence could prove extra dimensions.

Post Reply