Non-Euclidean Spherical Geometry
In a nutshell, this project allows you to walk around in a 3D space thats been curved into a 4D sphere.I made this super cool youtube video covering it, you should check it out here
What even is Spherical Geometry
Lets start by imagining a 2D person on the surface of a 3D sphere. If they walk far enough in any direction, they'll end up right bak where they started. If they draw two perpendicular lines, and extend them outwards, they'll eventually intersect. This completely breaks the rules of geometry we're used to!
To 3D observers like us, these behaviours are obvious. We can visually see how 2D space is curved, and how that would cause these effects. But the 2D person, who has no concept of the 3rd dimension, would be very confused.
You might think this is simular to living on a globe, but there's a big difference. We live on a curved object, not in curved space. While we spend most out lives on the "2D" surface of the earth, we can still shoot rockets into space and drill into the ground. If you shine a flashlight at the horizon, the light simply flies off into space.
For our 2D example however, the surface is all that exists. If they shine a flashlight, it doesn't just shoot off into outer-space, outer-space doesnt exist! The light will instead wrap around the sphere and hit them in the back. Everything from geometry to kinematics to light is subject to curvature.
Now imagine this senario one dimension higher, the 3D surface of a 4D sphere (S3). Thats probably quite hard to visualize, thats why I made this simulation!
The Actual Project
I made a rendering, lighting and physics system for S3. Here are some demonstrations of weird properties of spherical geometry.
Walking in any direction has you loop back to where you started. As we move, we can see objects strech in wacky ways.
It looks like we're on the inside of a massive hamsterball. The reality is much more complicated than that however. When you look "up", light arcs around the entire hypersphere and shows you ground on the other side of the world. The ground is completely flat.
Light sources illuminate a bright spot on the opposite side of the world from them. For the same reason that objects look larger as the get further away (curvature bending light to focus on distance objects), objects far from a light source receive a higher concentration of light, and so are illuminated more.
In this example, the glowing ball rolls around the world over and over again. When it is on the opposite side of the world, we can see that bright spot pass by.