WTF?

This is an ancient (ca. 2007) proof of concept exploring the 3-dimensional volume bounding a hypersphere (more details below)

Controls

Click above to ensure Flash has keyboard focus




Description from the original post:

Ever wondered what it'd be like to be floating inside the 3-dimensional surface of a hypersphere?

...probably not.

But it's something I've been curious about ever since I read Flatterland. (Go read it and what I'm doing here might make some sense ^_-)

If you think of a globe, an ordinary 3-dimensional sphere, its surface is 2-dimensional and locally flat. If you get in close enough, it looks like a sheet of paper. Well, if you extrapolate that to a 4-dimensional sphere, a hypersphere, its surface is 3-dimensional and locally flat. If you get in close enough, it looks a lot like our world.

But at a distance things get weird. If you go far enough in any direction - even up or down - you'll come back to where you started from, without feeling like you've turned at all. That also means you can see something that's right behind you as though it were a long way off in the distance in front of you.

Oh, and things do start to look smaller as you move away from them.... but only up to a point. After that they start to look bigger again, then smaller, then bigger, then they hit you in the back of the head because even though it looks like a huge thing way in front of you, it's actually a normal-sized thing right behind you. O_o

Anyway, I finally worked out the math to render this space (sort of - it's a good approximation, though). Click on the flash window, and use the arrow keys to move around. WASD will look left, right, up, down, and page up/down will move you vertically like an elevator. If you really want to get dizzy, press Q or E to twist your view.

The cubes in the space with you are there to give some point of reference and an environment to navigate through. They're like squares randomly drawn on the surface of a ball.

You'll notice that the cubes get brighter and fainter, and their outlines get more and less distinct. Shapes with thick outlines are within the quarter of the sphere that's in front of you. Things that are faded almost white are in the quarter-sphere behind you - their light has to travel the furthest through my simulated white mist to reach your eyes. When something's at its smallest, that means it's exactly a quarter-circle away from you (p/2 radians away, to be precise)

In the upper-left is a spherical compass showing roughly where the coordinate axes are pointing with respect to you.

When a pair of axes is just a dot in the middle of the sphere, it means basically "you can't get there from here" - picture an ant standing on the very top of a basketball: she can't go straight up or straight down from there, because that's perpendicular to the surface, and she's restricted to walking ON the surface. But, if she goes forward far enough, she'll start curving downward.

There's a lot of other neat phenomena in here, but this comment's already huge. Let me know what you think! I might try making a better version of this in the future.

Comments:

Incarn May 29, 2007

Oooooh. I have absolutely no clue on what you actually said in your comment, but I'm just bored. If I actually wanted to I bet I could just get enough sense to understand a little bit, like... "..Kay. I kindof get it."

But anyways, this is really fun to mess with. :+fav:

kitsane May 25, 2007

heehee it took me a bit to figure out how to work it (mostly because I was very tired when I read the comment) but this is awesome! Plus you get bonus points for actually putting in a meaty comment instead of ^v^ or * as some people do, which bugs me cause I want to know what they were thinking. Nice job :D :thumbsup:

CH4RLY May 25, 2007

Wow, really a great idea! I do note really understand everything, but I'm very interested in such things :)

Definitely a :+fav:

Do you know the cube-movies?

Some little suggestions:
Maybe you could add a mouse-control for instant animation? Most people (like me) will click in it without reading the description first ;)

The cubes sometimes look "inverted", concave not convexe just because of the colours. This may be intended, I'm not sure... Reply

DMGregory May 27, 2007

Thanks for the feedback!

I've seen the movie Cube... that was creepy. o_o

Yeah, I should put in some mouse support... maybe once I've refined the algorithm, though. Right now it only needs to re-draw once per frame, whereas when you move the mouse to look around it might update multiple times per frame, slowing it down a lot.

The cubes are coloured as if there were a light source at the w+ pole (1, 0, 0, 0), so if you're oriented in such a way that w+ is "down," then the cubes might look inverted. I could try colouring them based on the user's perspective, but then you'd be a kind of 4D angler fish, bobbing a lightbulb with you wherever you go. ^_-