Negative masses in the simulator?

What did you draw?
exfret
Posts: 585
Joined: Sun Jul 28, 2013 8:40 pm

Circular strangeness

Post by exfret »

Something almost as strange as Velocity Raptor going through the wall (viewtopic.php?f=3&t=89&start=20#p586) happens when you try to create a circular orbit with a negative-mass sun. What's happening?

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceG: -2,Qual: 1,Zoom: 0.86,xSet: -71.7,ySet: -164.6], [x0: 17.07,y0: 101.81,vx: 0,vy: 0,t0: 0,who: 1,m: -1000], [x0: 100.77,y0: 85.53,vx: NaN,vy: NaN,t0: 10,who: 3,m: 0]
Nobody ever notices my signature. ):
A Random Player
Posts: 523
Joined: Mon Jun 03, 2013 4:54 pm

Re: Circular strangeness

Post by A Random Player »

exfret wrote:Something almost as strange as Velocity Raptor going through the wall (viewtopic.php?f=3&t=89&start=20#p586) happens when you try to create a circular orbit with a negative-mass sun. What's happening?

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceG: -2,Qual: 1,Zoom: 0.86,xSet: -71.7,ySet: -164.6], [x0: 17.07,y0: 101.81,vx: 0,vy: 0,t0: 0,who: 1,m: -1000], [x0: 100.77,y0: 85.53,vx: NaN,vy: NaN,t0: 10,who: 3,m: 0]
NaN velocity! It appears to NaN everything it's evaluated in, causing the game to try to draw a line from (NaN,NaN) to it. The game then evaluates NaN to be 0, causing it to think it came from there.
$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: Negative masses in the simulator?

Post by testtubegames »

Oh, sure! I didn't tweak the circular orbits when I added in negative masses. (Of course, there's no such thing as a circular orbit when two bodies repel)

NaN, for the record, stands for 'Not a Number' -- and in this case stems from taking the square root of a negative number. Whoops. Gotta add this exception to the circular orbits calculation.
A Random Player
Posts: 523
Joined: Mon Jun 03, 2013 4:54 pm

Re: Negative masses in the simulator?

Post by A Random Player »

testtubegames wrote:Oh, sure! I didn't tweak the circular orbits when I added in negative masses. (Of course, there's no such thing as a circular orbit when two bodies repel)

NaN, for the record, stands for 'Not a Number' -- and in this case stems from taking the square root of a negative number. Whoops. Gotta add this exception to the circular orbits calculation.
But the planet should move in the imaginary direction instead, right? ;)
oops, 666th post here
$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: Negative masses in the simulator?

Post by testtubegames »

A Random Player wrote:
testtubegames wrote:Oh, sure! I didn't tweak the circular orbits when I added in negative masses. (Of course, there's no such thing as a circular orbit when two bodies repel)

NaN, for the record, stands for 'Not a Number' -- and in this case stems from taking the square root of a negative number. Whoops. Gotta add this exception to the circular orbits calculation.
But the planet should move in the imaginary direction instead, right? ;)
oops, 666th post here
Right, at which point you need to close your eyes and 'imagine' what the planet should be doing. :)
exfret
Posts: 585
Joined: Sun Jul 28, 2013 8:40 pm

Re: Negative masses in the simulator?

Post by exfret »

Hey look, negative masses even still generate ellipses in r^1 gravity:

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceG: 1,Qual: 1,Zoom: 0.51,xSet: 0.95,ySet: -114.8], [x0: 40,y0: -28,vx: 0,vy: 0,t0: 0,who: 2,m: -100], [x0: 199,y0: 36,vx: 0,vy: 0,t0: 15,who: 2,m: 100], [x0: -100,y0: 51,vx: 0,vy: 0,t0: 50,who: 2,m: 100]
Nobody ever notices my signature. ):
User avatar
testtubegames
Site Admin
Posts: 1148
Joined: Mon Nov 19, 2012 7:54 pm

Re: Negative masses in the simulator?

Post by testtubegames »

exfret wrote:Hey look, negative masses even still generate ellipses in r^1 gravity:

Code: Select all

Gravity Fun at TestTubeGames.com: [ForceG: 1,Qual: 1,Zoom: 0.51,xSet: 0.95,ySet: -114.8], [x0: 40,y0: -28,vx: 0,vy: 0,t0: 0,who: 2,m: -100], [x0: 199,y0: 36,vx: 0,vy: 0,t0: 15,who: 2,m: 100], [x0: -100,y0: 51,vx: 0,vy: 0,t0: 50,who: 2,m: 100]
Whoa, that's neat -- and surprised me for sure. But of course, a r^1 attractive force isn't escapable with any finite energy... and I guess having a repulsive force there, too doesn't change that. Hrm. Though if the + and - planets were fixed stars at the same spot, the third body would feel no net force... so the fact that they're moving too is important. Gotta ponder this one.
User avatar
robly18
Posts: 413
Joined: Tue Jun 04, 2013 2:03 pm

Re: Negative masses in the simulator?

Post by robly18 »

Okay so... What if there were imaginary distances and whatnot in the simulator?

Actually, would such thing even be simulate-able?
In fact, I am pretty sure it would. Would you be able to show it? Maybe with 3-d shenanigans.

Anyway, Andy. Maybe it could be an update for the unity 3-d version? Because, you know, 3-d.
Wait, would imaginary x and imaginary y mean it would be in four dimensions instead?

Crap.
Still, food for thought.
Convincing people that 0.9999... = 1 since 2012
User avatar
testtubegames
Site Admin
Posts: 1148
Joined: Mon Nov 19, 2012 7:54 pm

Re: Negative masses in the simulator?

Post by testtubegames »

robly18 wrote:Okay so... What if there were imaginary distances and whatnot in the simulator?

Actually, would such thing even be simulate-able?
In fact, I am pretty sure it would. Would you be able to show it? Maybe with 3-d shenanigans.

Anyway, Andy. Maybe it could be an update for the unity 3-d version? Because, you know, 3-d.
Wait, would imaginary x and imaginary y mean it would be in four dimensions instead?

Crap.
Still, food for thought.
Hmm, yeah, I suppose you could just remove the "coordinates must be real numbers" restriction. Then you (could) get motion in the imaginary direction, too... negative distances and all that fun stuff too. I'm not sure it'd fit in this simulation... but like you said, it's good food for thought. In physics, we put these restrictions in place on values (this being one example), but would anything especially interesting happen if we loosened those restrictions (aside from just getting another dimension to move in, of course).
User avatar
robly18
Posts: 413
Joined: Tue Jun 04, 2013 2:03 pm

Re: Negative masses in the simulator?

Post by robly18 »

testtubegames wrote:Hmm, yeah, I suppose you could just remove the "coordinates must be real numbers" restriction. Then you (could) get motion in the imaginary direction, too... negative distances and all that fun stuff too. I'm not sure it'd fit in this simulation... but like you said, it's good food for thought. In physics, we put these restrictions in place on values (this being one example), but would anything especially interesting happen if we loosened those restrictions (aside from just getting another dimension to move in, of course).
Well it would mean a universe would have twice as many extra dimensions to move around in. Let's see...
In r^-2 imaginary distances would eventually equal... well, i would become -1, 4i would become -1/4... So negative masses in an orbit on both imaginary planes would behave like positive masses on the real plane. Then, if you "slanted them"... Well, only one way to find out! I would expect chaos to take over and make the masses randomly switch between attraction and repulsion!
Convincing people that 0.9999... = 1 since 2012
Post Reply