Author Topic: Worm holes (having trouble with math)  (Read 7232 times)

0 Members and 1 Guest are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Worm holes (having trouble with math)
A good 4D game would be unusual. Might even be a publicity point.
-C

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: Worm holes (having trouble with math)
I'm considering doing render-to-texture instead, and choosing texture coordinates to make the effect look reasonably like it would look if we were to do the 4D calculations.

You should find out how to use portals. I think those should do exactly what you want. I'm not that familiar with computer graphics but there are several game engines that support them. I used to make stuff like this in Descent 2, where it was easy to trick the cube-based graphics engine into rendering "impossible" levels that can't exist in 3D space, and I have seen maps in newer games with similar effects.

Making the whole playing area into some sort of messy 4-manifold would be pointless, as it would be more computationally expensive and there would be no difference in anything from the player's point of view.
« Last Edit: May 07, 2008, 03:04:37 am by CP5670 »

 

Offline watsisname

Re: Worm holes (having trouble with math)
LOLWUT, a intelligent discussion on extra-dimensional maths on HLP?
In my world of sleepers, everything will be erased.
I'll be your religion, your only endless ideal.
Slowly we crawl in the dark.
Swallowed by the seductive night.

 

Offline S-99

  • MC Hammer
  • 210
  • A one hit wonder, you still want to touch this.
Re: Worm holes (having trouble with math)
Yeah and what about my question?
Every pilot's goal is to rise up in the ranks and go beyond their purpose to a place of command on a very big ship. Like the colossus; to baseball bat everyone.

SMBFD

I won't use google for you.

An0n sucks my Jesus ring.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Worm holes (having trouble with math)
Does anyone know how to do this sort of math?
Herra Tohtori, if anyone. But why must you make things the hard way? What spectacular things are you trying to achieve? A purdy vortex/tunnel/something would be quite enough.

Actually, Rian's probably better-qualified when it comes to the math of general relativity, being an MIT physics student and all. I doubt that wormhole crap is something either of them could do, however.

Anyway, aardwolf, what advantage does this whole fourth-dimensional-rendering thing have over a regular old FS2 subspace vortex? Does it show gravitational lensing? That's what you'd see around a real wormhole...I think Lobo's right. Just go for a pretty vortex thing.


 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
Re: Worm holes (having trouble with math)
Quote
Anyway, aardwolf, what advantage does this whole fourth-dimensional-rendering thing have over a regular old FS2 subspace vortex?

It has none in a computer graphics context. That's what I'm trying to tell him. :p

GR theory or Riemannian geometry is irrelevant here since it's not necessary or appropriate for what he is trying to do.

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: Worm holes (having trouble with math)
In normal space, it would look the same as always, but when the space gets sufficiently distorted (at a worm hole), the view would be considerably different. Note that in <x,y,z,w> space, at a worm hole, there is a spherical cylinder (that is, a sphere in <x,y,z> space, which extends to all values of w) that simply does not exist - there is no point in space that occupies the region in the center of the worm hole.

However, looking at it from the outside, I believe that the a ray to the center of the worm hole would come out on the same side it entered on the far side of the worm hole. I have also been able to determine that, looking along the plane formed by the two axes that are not the through-the-worm-hole axis, every direction you would see the far side of yourself (provided there is light to illuminate it, etc.).

And once again, to reiterate, I am doing this all in a geometry context, not in a physics context. I don't care about gravity or relativity, just that the rays are the correct geodesics of the 3d surface of the 4d object.

 

Offline watsisname

Re: Worm holes (having trouble with math)
I'm no expert on this sort of math or physics, but wouldn't the curvature of space around the opening of a wormhole would be similar to the curvature of space around any massive spherical object?  In fact, wouldn't this region at any distance above the "horizon" of a wormhole be indistinguishable from that around an ordinary blackhole?

If that's the case then I recall that radial distances from the center would be stretched.  The greater the gravitational field (curvature of 4D space), the greater this effect.  This is even apparent for the Earth:  The radius of the Earth is not exactly the same as half the diameter.
I'm not sure how helpful that is but maybe it's something to think about if you're trying to get an accurate portrayal of the distortion effect around these things.
In my world of sleepers, everything will be erased.
I'll be your religion, your only endless ideal.
Slowly we crawl in the dark.
Swallowed by the seductive night.

  

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Worm holes (having trouble with math)
In normal space, it would look the same as always, but when the space gets sufficiently distorted (at a worm hole), the view would be considerably different. Note that in <x,y,z,w> space, at a worm hole, there is a spherical cylinder (that is, a sphere in <x,y,z> space, which extends to all values of w) that simply does not exist - there is no point in space that occupies the region in the center of the worm hole.
odesics of the 3d surface of the 4d object.

You mean to say there's a spherical cylinder that doesn't exist in your geometrical approximation of a real wormhole.

You can't understand the situation without doing the actual math. There's no sense in doing it with plain geometry because geometry is sadly inadequate. That's why wormholes can't be described by Euclidean geometry, and why a whole new field of physics was invented to explore them.

I admire what you're trying to do, but isn't it rather like beating your head on a wall?

 

Offline Mika

  • 28
Re: Worm holes (having trouble with math)
No-one expects the Physics inquisition!

Here, I don't understand what effect are you looking for, if it is not supposed to look like a wormhole in general relativity - according to current understanding (and actually my understanding of the issue), this may only happen when two black holes collide. In a real wormhole, being inside black holes, in forwards direction it is assumed that observer cannot see anything (since all photon paths are going towards the center like observer himself), while if facing backwards, observer sees the scenery what he just occupied before crossing the Schwarzschild radius since now photons can enter his eye while travelling towards the center. For the observer outside, it appears that the person never crossed the Schwarzschild radius, all that he can see is a red-shifting image of the person that fell in.

Now that being said, if this warping has nothing to do with physics, is it elongation or non-linear compression that you would like to see? The good thing with these is that you don't actually need four dimensions to represent them, three is enough. If it is an enhancement to the Freespace's two-dimensional warp-animation, then hyperbola could be a good initial guess. Would you like the warping ship to deform according to the distance it is from the hole's mouth?

Mika
Relaxed movement is always more effective than forced movement.

 

Offline watsisname

Re: Worm holes (having trouble with math)
Quote
I believe that the a ray to the center of the worm hole would come out on the same side it entered on the far side of the worm hole.

Are you saying that the direction of motion at entry is the same as at the exit?  If so then I believe you're correct on this.  An object entering when moving in the +x direction will exit moving in the +x direction, which would look pretty interesting if +x at the exit happened to point back to the opening it entered from.  Here's a picture to show what I mean:

In my world of sleepers, everything will be erased.
I'll be your religion, your only endless ideal.
Slowly we crawl in the dark.
Swallowed by the seductive night.

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: Worm holes (having trouble with math)
Actually that is backwards from what I believe would happen. Follow the rays in the diagram in the original post to see what I mean.

And by there being a spherical cylinder that doesn't exist, also consult said diagram, and note that there is no point on the surface that exists directly above or below the narrowest circle of the worm hole. There is an empty column of 4d space.

As for the effect I'm trying to pull off, I want it so that the color at the pixel is (or very nearly is) the color of the ray that goes from your eye outward through that pixel on the near plane of the frustum, is bent by the distortion of the space, and eventually hits something (or the skybox) in, on the viewing side, or on the far side of the worm hole.

I have done some analysis (drawing stuff) of the problem, and I will copy them below shortly. have posted some copies of the drawings:


« Last Edit: May 07, 2008, 04:48:38 pm by Aardwolf »

 
Re: Worm holes (having trouble with math)
I do believe this is the most awesome discussion I've ever seen on these boards. :)

I'd help if I could, but unfortunately I've not done any 4d geometry yet.
"You need to believe in things that aren't true. How else can they become?" -DEATH, Discworld

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Worm holes (having trouble with math)
the closest i came was when i tried to do quaternions. it only sorta worked, but i had a bunch of different kinds of gimbal lock, and i accidently rendered the scene to a plane which was mysteriously rotating in space. sorta like the end of superman.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: Worm holes (having trouble with math)
One annoying thing about 4D math is that the vector product is a ternary operator; that is, it takes 3 argument vectors.



Edit:
Actually, this formula is something I extrapolated myself. I've never done a full proof or analysis, and have luckily never had to use the damn thing.
« Last Edit: May 07, 2008, 05:47:02 pm by Aardwolf »

 

Offline Mika

  • 28
Re: Worm holes (having trouble with math)
Ah, I think I got it. It is gravitational lensing, but instead of using a spherical source, you would like to use a cylindrical source. About your questions of possible ray paths, I unfortunately cannot answer them since I don't know which laws of Physics are thought to apply and which are ignored. But since it's your game, you can pretty much describe a phenomenological model for that cylinder, which can do pretty much you want it to do.

In the real world I think it is possible that the photon striking infinitesimally (dr) further than the Schwarzschild radius in the direction of the local tangent at the edge of the black hole, you could get the photon circle the black hole by certain amount of time with differing orbits (is it an epicycle?). At the limit when dr approaches Schwarzschild radius, the photon would circle event horizon forever, though the probability of this happening would according to my understanding, approach zero. Now, a little bit over that and it is doomed to go to singularity.

One of the interesting related things could be the found from gradient index lens:
http://en.wikipedia.org/wiki/GRIN_lens

Also, the way I would do that effect would be to use, for example, the law of gravity to model a particle with very small mass (and sufficient velocity) and solve the equation of motion for that in xy-plane. Since this is computationally extremely heavy operation, I would recommend calculating trajectories for several "photons" only in the development phase, and then using those trajectory initial conditions as look up tables and then linearly approximating values between them.

Mika
Relaxed movement is always more effective than forced movement.

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: Worm holes (having trouble with math)
Yes, I will most likely approximate the effect using a render-to-texture and some fancily pre-calculated and interpolated/transformed texture coordinates.

Oh, and Edit:

Here's another way to think of the setup. Add a fourth dimension. Each point in 3d space gets a coordinate in this fourth dimension. The speed of the ray is constant. Assume, for simplicity, that it is 1. Assume for simplicity also that the ray has mass 1 (so that force = acceleration). There is a force perpendicular to the surface (that is, a scalar multiple of the 3-vector product of the 3d axes), with magnitude equal to the curvature of the curve parallel to the velocity at that point, taken at that point.

2nd edit:
(and thus the ray maintains constant speed and remains on the surface of the 4d object.)

3rd edit:
This diagram is labeled. Read the labels. I'm not sure about the direction of the bending of rays for the blue region, it might be opposite of what I wrote. All values are made up (read : don't take it literally).



4th edit (someone please post something):
I realized about an hour ago that render-to-texture might not work well; it works perfectly for infinitely-far-away things (the skybox, for example), but sucks for close-up stuff.
« Last Edit: May 08, 2008, 12:02:33 am by Aardwolf »

 

Offline Ulala

  • 29
  • Groooove Evening, viewers!
Re: Worm holes (having trouble with math)
fascinating.  :yes:
I am a revolutionary.

 

Offline watsisname

Re: Worm holes (having trouble with math)
Actually that is backwards from what I believe would happen. Follow the rays in the diagram in the original post to see what I mean.

That's actually exactly how I came to my original conclusion.  Look carefully at the yellow ray in the image in your first post.  Let's designate its original direction as being moving toward -x.  (Thus -x is going left at the top surface).
Now notice that in this view it shows the normal space curving around and meeting back up with the "bottom side" of the wormhole, thus demonstrating how it's a shorter path through the wormhole than from one opening to the other via normalspace.  This means that looking at the bottom surface, -x is going to the right.  So the yellow ray ends up still going in the -x direction... it's direction in normal space never changes.

Going a bit further, imagine in this illustration a new ray entering the top portal from the left side (moving +x).  This would be interpreted as a ray originating in normal space located directly between the two portals.  Following its path through the wormhole we see it exits the bottom portal moving to the left (still +x) which invariably leads back toward the left side of the top portal.  Viewed from normal space, we'd see this ray repeatedly travelling from the bottom portal to the top portal and "teleporting" back.

...somehow I think all this conjecture on ray paths might actually be incorrect since it's being taken from the context of a reduced-dimensional interpretation of a wormhole, and not straight from the actual math.  Still kind of neat to use as a thought experiment.

In my world of sleepers, everything will be erased.
I'll be your religion, your only endless ideal.
Slowly we crawl in the dark.
Swallowed by the seductive night.

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Re: Worm holes (having trouble with math)
This is not the finished product. It's just a cool-looking thing that applies distortion with trends similar to what would be expected in a working version.

http://www.game-warden.com/masterpokey/CarrierAssault/WormHoleLensB.avi

Watch and enjoy.
« Last Edit: May 08, 2008, 02:49:35 am by Aardwolf »