Relativity?

What did you draw?
User avatar
testtubegames
Site Admin
Posts: 1148
Joined: Mon Nov 19, 2012 7:54 pm

Relativity?

Post by testtubegames »

Heck yeah!

We'd been talking about adding Black Holes into the simulator for ages -- and over the past few days I've started working on it. Down the relativistic rabbit hole we go!

<<Read my blog post on it to learn more>>

I don't envision the simulator getting anywhere *near* as many relativistic features as Velocity Raptor, say. But if I'm gonna add black holes, I'd like to do it right.
exfret
Posts: 585
Joined: Sun Jul 28, 2013 8:40 pm

Re: Relativity?

Post by exfret »

What about lensing effects? And space-time expansion so we can have red-shift. Or, we could just have optional Doppler effects while in Ptolemy mode. And, if you're adding relativity, why not add in other geometries to go along with it, like embedding planets on the surface of a torus (that would be... I don't even know). Imagine how tan(r) would compute... But forget tori, what about spheres, Klein bottles, mobiüs loops, hyperbolic geometry, or the ability to describe your geometry using implicit 3-variable equations (yes implicit)*, and in which the surfaces can change over time; a planet's distance traveled, two planets' distances, the area of the triangle between 3 planets, total gravitational forces, total speed, net velocity, etc. Why not allow the gravity law to change as well? It could also change depending on the total amount of gravity. And, to make sure all of this is accurate, do Graham's number calculations/sec (I think that's more than the Universe "does," with Planck time and that jazz). After you get that working, you can make GSim compatible with Celestia (if it's still around by the time you complete this).

*This could also be applied for gravity laws. When there are two or more values, you could treat it like quantum mechanics, where the planet is somewhere in there with certain probabilities.
Nobody ever notices my signature. ):
NealCruco
Posts: 197
Joined: Thu Mar 27, 2014 8:26 pm

Re: Relativity?

Post by NealCruco »

Looking great! I'm not sure if I understand everything, but it looks like you're taking the GSim in very interesting directions. I can't wait to see the finished product!
exfret
Posts: 585
Joined: Sun Jul 28, 2013 8:40 pm

Re: Relativity?

Post by exfret »

I'm still pondering the torus geometry (maybe this should be an edit... Eh, whatever, it doesn't matter). This reminds me of a problem my brother once asked me. If you have an infinite plane of dust that is completely evenly distributed, and you remove a circular section of that dust, what exactly happens? (Come to think of it, this might be a good xkcd what-if question). With the torus, gravity would go on forever with many attractions between objects. Gravity laws that quickly descend to 0 might at least be imaginable, but increasing functions would diverge and *shivers*. Oscillating functions would be... Just strange. I'm wondering whether you could calculate the value for sin(r) or tan(r). If not, what about sin(1/r)? Or tan(1/r)? What about a constant gravity? I'm so curious now. May I change this to my priority and bump my other one down?
Nobody ever notices my signature. ):
AlternateGravity
Posts: 80
Joined: Thu May 15, 2014 5:45 pm

Re: Relativity?

Post by AlternateGravity »

In addition to black holes I think wormholes would make a good addition to the gravity simulator.
Gravitons would be my favorite particle as their existence could prove extra dimensions.
exfret
Posts: 585
Joined: Sun Jul 28, 2013 8:40 pm

Re: Relativity?

Post by exfret »

Of course, you'd have speed-of-light delay for gravity and their would be a delay in the light of objects in Ptolemy mode as things you could do. Also setting the speed of light.
Nobody ever notices my signature. ):
User avatar
testtubegames
Site Admin
Posts: 1148
Joined: Mon Nov 19, 2012 7:54 pm

Re: Relativity?

Post by testtubegames »

AlternateGravity wrote:In addition to black holes I think wormholes would make a good addition to the gravity simulator.
Ah, interesting. I don't see why not. The only thing I need to check is how gravity and wormholes interact. Namely, if a star is near one entrance, does it pull something towards the other entrance. Thinking of the embedded 'stretchy fabric' diagrams I've seen, if gravity is the curvature of spacetime, the wormhole (being a thinly curved tube) will be the biggest disturbance around. But, yeah, I'll need to look into this.
exfret wrote:Of course, you'd have speed-of-light delay for gravity and their would be a delay in the light of objects in Ptolemy mode as things you could do. Also setting the speed of light.
Yes to the delayed gravity. I figure I'll do this in a fairly simplistic, approximate way. (I do recall the headache this issue caused in Velocity Raptor :)) So when you place down a star, planets won't feel it's gravity right away, depending on their distance. Ptolemy mode with relativity will introduce its own can of worms. A short list of things I'd need to add to make ptolemy 'right': Doppler Shift, Length Contracting other objects distances, processing the speed of time differently, light delay of objects...

So for the first iteration, I'm going to ignore the relativistic-ptolemy issues. But I'll keep it in mind down the road -- either to 'fix' it, or to qualify it.

And setting the speed of light is in fact how the relativistic mode will be activated. Light will start with an infinite speed. You can set it slower, and slower, and slower. The slower light is, the easier it is for objects to turn into black holes, and the funkier their paths become. Hopefully, with fast-but-not-infinite light, you'll be able to reproduce the precession of Mercury pretty accurately.
exfret wrote:What about lensing effects? And space-time expansion so we can have red-shift.
Hmm... in the current view-mode, lensing wouldn't make much sense. But if there were a 'telescope-from-planet-x' mode, then I imagine that would become important. Space-time expansion leads us into cosmology and the geometry of the universe... not sure how I'd be able to do that. For instance, torus mode, as you mentioned, kinda works for 1/r^2, doesn't work for r^1, and leads to a 'huh?' moment for sin(r). Lots of divergences, and in the case of that periodic function, it would be divergent in a weird way that depending on the size of the torus. Not sure how we'd be able to do this justice in the simulator without breaking everything -- so I'm going to stick with your old priority, at least for now ;)
exfret
Posts: 585
Joined: Sun Jul 28, 2013 8:40 pm

Re: Relativity?

Post by exfret »

testtubegames wrote:Ah, interesting. I don't see why not. The only thing I need to check is how gravity and wormholes interact. Namely, if a star is near one entrance, does it pull something towards the other entrance. Thinking of the embedded 'stretchy fabric' diagrams I've seen, if gravity is the curvature of spacetime, the wormhole (being a thinly curved tube) will be the biggest disturbance around. But, yeah, I'll need to look into this.
If gravity did go Through the Wormole, with Morgan Freeman, wouldn't you end up with the same problem as in torus geometry?
testtubegames wrote:Yes to the delayed gravity. I figure I'll do this in a fairly simplistic, approximate way. (I do recall the headache this issue caused in Velocity Raptor :)) So when you place down a star, planets won't feel it's gravity right away, depending on their distance. Ptolemy mode with relativity will introduce its own can of worms. A short list of things I'd need to add to make ptolemy 'right': Doppler Shift, Length Contracting other objects distances, processing the speed of time differently, light delay of objects...
Delayed gravity would be awesome.
testtubegames wrote:Hmm... in the current view-mode, lensing wouldn't make much sense. But if there were a 'telescope-from-planet-x' mode, then I imagine that would become important.
What I was thinking would be that it would calculate the lensing effects based on the zoom/distance and the field of view. The view of the GSim could be shown as a planar cross section of the Universe visible with your field of view and at your distance/zoom. You would be a far-off observer of this plane. GSim is getting to the point, though, where it might not make sense to have all these features, but not 3D. Imagine someone who's playing it for the first time (at least, what I portray them like):
"Woah, the dude who made this is clearly awesome: Everything looks so color-like. I love this planet flinging, wonder how many I can fling."
"Okay, up to, like, 100, and still not signs of lag, wonder what other stuff this has."
"Awesome! I can set the time, and save my set-ups!"
"I wonder why there wasn't a tutorial to introduce me to all this cool stuff in the menu..."
"Ooh, I can change the laws of gravity, and look at all these settings, this must be a very advanced simulator."
A while later, after flinging black holes through wormholes and investigating the relativistic effects while spamming stuff with dust, just cause, all in a non-standard gravity law and running at 80 fps, every celestial body being custom named and color, with ptolemy focused on a planet circling the black hole in a rotating frame of reference, this person still can't do gravity stuff in 3D
Also, the GSim is getting to a point at which every new feature adds a lot more usability. What I mean is that if you have a lot of new features and you add in 3D, then you can do everything you used to be able to do, but in 3D. Now, I'm not pushing for 3D, I just wanted to point this out. I think GSim would be perfectly fine w/o 3D, too, and 3D would add a lot of complexity for the user and programmer.
testtubegames wrote:Space-time expansion leads us into cosmology and the geometry of the universe... not sure how I'd be able to do that.
Get a cosmology degree, duh.
(JK, but that would be pretty awesome).
testtubegames wrote:Not sure how we'd be able to do this justice in the simulator without breaking everything
Well, you would only break everything in torus mode, which is technically already broken because you haven't made it yet. Torus mode would be amazing though. In fact, it would be even cooler "Than Other Really Underused Shapes." (That spells TORUS by the way).
testtubegames wrote: -- so I'm going to stick with your old priority, at least for now ;)
Liar, you said you'd take my first priority. In fact, I'd like to amend my priority for the final time (seriously no change-backs) to adding in that compatibility with Celestia. Since this might be a big feature, it will probably take you a few hundred updates to finish, but only a few. :twisted:
I'm just kidding. I'm perfectly fine with you not adding features created by the far reaches of my imagination. You're doing an awesome job on the Sim, and it's turning out great. Thanks for all the cool stuff!
Nobody ever notices my signature. ):
User avatar
wtg62
Posts: 174
Joined: Mon Jan 27, 2014 11:30 pm
Location: Texas, United States

Re: Relativity?

Post by wtg62 »

exfret wrote:What about lensing effects? And space-time expansion so we can have red-shift. Or, we could just have optional Doppler effects while in Ptolemy mode.
I think gravitational lensing effects would require a shader of some sort.
Since we are dealing with 3d gravity displayed on a 2d plane, it would make sense for it to exist, but since objects around it are to the side or are in front of the object, the effect would be very insignificant or not even present.
Now, the grid would obviously suffer from the gravitational lensing effect due to it being behind everything, so *that* would be distorted.

I'd like the idea of space-time expansion, but we wouldn't really get any significant effects considering how small the play box in gsim is.

Andy, I've read your blog and noticed the orbits around a black hole displayed.
At close distances, orbits like these happen, but the further away you get, the more likely you can end up with a stable (but extremely eccentric) orbit.
An example of this would be the stars orbiting Sagittarius A*. You can see the trajectories here. The red light in the center would be the black hole.
Again, we have only so much space to mess with in gsim (and we can't zoom out enough to see everything at once), so this would probably be something insignificant.
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: Relativity?

Post by testtubegames »

exfret wrote:If gravity did go Through the Wormole, with Morgan Freeman, wouldn't you end up with the same problem as in torus geometry?
Yup, a similar problem. But a quick scan of the (forum) literature makes it seem like I might be able to ignore it.
exfret wrote:I think GSim would be perfectly fine w/o 3D, too, and 3D would add a lot of complexity for the user and programmer.
That's my main concern -- it'd be a lot harder for the user. Right now you can pretty precisely launch a planet with ease. In 3D, though, it gets a lot harder to do that...
wtg62 wrote:I think gravitational lensing effects would require a shader of some sort...
Now, the grid would obviously suffer from the gravitational lensing effect due to it being behind everything, so *that* would be distorted.
Andy, I've read your blog and noticed the orbits around a black hole displayed.
At close distances, orbits like these happen, but the further away you get, the more likely you can end up with a stable (but extremely eccentric) orbit.
Yeah, the grid should really warp, even just for the 'neat' visual effect though that'll probably be a little later in the process.

And you *can* get orbits around black holes -- though I'll leave it to you to try it out :)

Phase 1 of relativity is basically done, too. Haven't added in time-delay yet, but it gets most of the other things right. If you want the secret link, send me a PM. Hopefully getting the updater fixed this evening - so I'll finally be able to get all those 'priorities' in the main, real version of the game!
Post Reply