Skip to content
Omar Shehata edited this page Dec 13, 2017 · 12 revisions

Our approach to understanding 4D geometry is inspired by Edwin Abbot's Flatland. We've set up the app so that you can view 1D slices of 2D objects, as well as 2D slices of 3D objects, in the hopes that students will be able to make sense of the 3D slices they see of 4D objects.

Quickstart - Slicing 3D Sphere

We're going to show you how to view and slice a 3D object and explain the basic features of the app in the process.

Slicing 3D Sphere

To do this:

  1. Access the app at https://stodevx.github.io/humke-4d-geometry/
  2. Click on 3D to go into the 3D world
  3. Open up the Viewing Controls folder on the top right.
  4. Drag the orange slider to move the plane of intersection.

In every mode, the left view is a full projection view of the object. So in 3D, you're seeing a 3D object projected onto a 2D screen. In 4D you would see a 4D object, projected onto a 3D screen, which is then projected onto a 2D screen.

The right view is always one dimension less, and shows you the resulting slice of the plane of intersection with the object.

Viewing Controls

In any mode, you can choose which axis to fix via the drop down. If you pick Y in 3D, then you'll see the XZ plane (which covers a 10x10 area spanning the whole space) with no thickness along the Y. You can then move this plane along the Y.

In 3D, this is the equivalent of being able to see what the inhabitants of flatland would see if you passed a 3D sphere through their world. First they would see a dot come into existence out of thin air, then it grows into a circle, before shrinking back down and disappearing. It's a very bizarre phenomenon to 2D beings, but we know it's just a higher dimensional shape passing through a lower dimensional plane.

Another fun one to look at is the twisted ribbon (how to input this is explained in the section below).

Slicing a Ribbon

Notice that a twisted structure in a higher dimension can be seen as a rotation in a lower dimension!

Viewing Tips

  • You can collapse either the left or right view via the checkboxes under viewing controls.
  • Mouse wheel can be used to zoom in
  • Hold left click and move the mouse to rotate the camera (only works in 3 or more dimensions)
  • Hold right click and move to pan the camera
  • Hit the G key to toggle hiding the grid & axes

There is an additional option in 2D called Whole Shape Slicing which allows you to see the rest of the shape you're slicing with lower opacity:

Viewing whole shape while slicing

Input

In general, you can input objects in three ways:

  1. Cartesian Equations
  2. Parametric Functions
  3. Convex Hull of a given set of points

Click on Shape Properties to expand this folder and change the input.

Cartesian Equations

You can enter any kind of equation in as many variables as you have dimensions (x and y up to z and w).

In 2D, you can enter inequalities to define regions:

Drawing Cartesian Equations

In 3D & 4D, only equality works. But you don't have to use all the variables. For example, x^2+y^2 = 10 in 3D makes a tube.

In 4D, you can't see the actual four-dimensional cartesian surface, but you can see its 3D slices.

Since what you're seeing in 3D and 4D is an approximation of the surface defined by the function, you can use the resolution drop down to increase the number of samples.

  • Low Resolution - good for when you're changing things up a lot. Might contain a lot of inaccuracies.
  • Medium Resolution - better quality than low, but things might be slower.
  • High Resolution - very slow. Only use when you've reached a shape you just want to visually inspect without changing.

Parametric Functions

You get to define functions for your x, y, z etc.. in terms of the parameters a and b.

In 2D, a is the main parameter. b is used as a way to fill in a region. The app will take the minimum and maximum values of b and draw the equation at those values. Checking the Fill Shape box will attempt to fill in the area between them. (Currently does not work when the shape has more than one hole).

In 3D, a and b are the main parameters used to define the surface. c is supposed to do the same thing in 2D, where it defines the upper and lower bound of a solid volume, but it currently is NOT used.

Convex Hulls

This is simply input as a set of points (pairs in 2D and triplets in 3D). In 3D or higher, it can be hard to work with such a tiny input box. We hope to improve the UI for this. For now, we've found it useful to write down the points in your favorite text editor and then copy them in.

Built-in Examples

For every mode, you'll always find a set of available built in examples. If you click on the Builtin Examples folder, then select any of the examples, it will populate the input fields for you. This is a great way not just to see specific shapes, but to see what's possible in the app, and modify them yourself.

Cool Things to Try

The app really shines when you can see the same phenomenon in different dimensions. Here's some of the cool things we've found:

Sheared Tubes

If you take a sphere in 3D:

x^2+y^2+z^2 = 10

And remove the variable of the axis you're currently slicing through (the default in 3D is Y):

x^2+z^2 = 10

You get a tube:

3D Tube

The interesting thing about this tube is that it still looks like the intersection of a sphere along the XZ slice. If you couldn't see the higher dimensional projection, you couldn't tell the difference between a tube and a sphere!

Now shearing it is where things get interesting. Try moving the x by the missing variable:

(x+y)^2 + z^2 = 10

Sheared 3D Tube

Now it looks like a moving circle! In fact, we can shear the tube by the sin(y/2) instead:

(x+sin(y/2))^2+z^2 = 10

And we get a circle that moves in a harmonic motion!

Harmonic Sheared 3D Tube

Now we can try the same thing in 4D. Take the hypersphere:

x^2+y^2+z^2+w^2 = 10

And remove the w variable. What you get will still look like a slice of a hypersphere, but we know it's actually a hypertube now! (You can verify this by looking along the other axes).

Now what happens if you move the x by the sin(w/2) ?

Harmonic Sheared 4D Tube

But of course, we know it's not really a moving sphere. We know it's a sheared hypertube, whose hyperradius is the volume of that sphere, and it goes back and forth along the w dimension!

We hope by playing around this way you get an intuition for how the structure of these higher dimensional objects look like.

Slicing a Tesseract

A Tesseract is a 4-dimensional cube. Images of it are popular on the web:

Tesseract

By The original uploader was Tomruen at English Wikipedia - Transferred from en.wikipedia to Commons by Jalo using CommonsHelper., CC BY-SA 3.0, Link

It looks like a cube within a cube. It's not immediately obvious where the inside and outside of this 4D cube are. Looking at its 3D slices helps us find this boundary:

Slicing Tesseract

The yellow is a hyperplane. That is an XYZ cube, with no depth along the W. It fills up all the volume in XYZ space, but it is "flat" in 4 dimensions. We're moving it along the W. Notice how we don't see anything once the hyperplane is inside the innercube.

We conclude from this that the innercube is the far boundary (it looks smaller because it's further away along the W) and that beyond that, there is nothing. You're no longer inside the tesseract.

Slicing Tesseract

Notice how the tesseract is bounded by what looks like a trapezoid on each side. But we know that's not really a trapezoid. The right side of the screen shows us that that is still a perfect cube. It just looks distorted because we're looking at a 4 dimensional projection on a 3D screen (which we're then looking at through a 2D screen).

Distorting the Cube

The nice thing about viewing all this in the app is that we can change it however we want! I'm going to take the first point in this tesseract:

(-5.0,-5.0,-5.0,-5.0)

And move that further along the X, so that it becomes:

(-9.0,-5.0,-5.0,-5.0)

Notice how that point now juts out. Here's before:

Perfect Tesseract

And after:

DistortedTesseract

That means that as I move along the X, once I get to the edge of the boundary, I should see something appear now. Let's take a look:

Shrinking Tesseract Slice

It's a shrinking cube! If this looks surprising, notice that the same exact thing happens in 3D. Take a cube:

Cube Slice

Now I'm going to move one of the points up along the Y:

Shrinking Cube Slice

And that is exactly what we see in 4D, except with one extra dimension! Can you find more phenomenon like this? (If you do, let us know!)

Troubleshooting

If things start to break, try refreshing the page, and also please let us know what broke by opening an issue on this repo!