Page 3 of 4

Circular strangeness

Posted: Fri Aug 30, 2013 10:36 am
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]

Re: Circular strangeness

Posted: Fri Aug 30, 2013 4:45 pm
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.

Re: Negative masses in the simulator?

Posted: Sat Aug 31, 2013 2:24 pm
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.

Re: Negative masses in the simulator?

Posted: Sat Aug 31, 2013 2:39 pm
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

Re: Negative masses in the simulator?

Posted: Mon Sep 02, 2013 6:19 pm
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. :)

Re: Negative masses in the simulator?

Posted: Sun Sep 15, 2013 7:47 pm
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]

Re: Negative masses in the simulator?

Posted: Sun Sep 15, 2013 10:48 pm
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.

Re: Negative masses in the simulator?

Posted: Mon Sep 16, 2013 5:39 am
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.

Re: Negative masses in the simulator?

Posted: Mon Sep 16, 2013 5:46 pm
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).

Re: Negative masses in the simulator?

Posted: Tue Sep 17, 2013 3:29 am
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!