Last edited 13dec10 by kearns5-at-illinois.edu.

# Surf4D: Exploring Shadows of the Fourth Dimension

## Overview

This program takes parametric coordinates for a four-dimensional surface and outputs a three-dimensional shadow that can be rotated in any direction.

### Creating the Program

Work on my project began during the Mathematica presentation given to us at the beginning of the semester by Bruce Carpenter. While explaining the ParametricPlot3D function to us, Professor Francis remarked that one of the examples was a "very important surface". Deciding it could be useful, I copied down the parametric equations for the surface and plotted it in a Mathematica notebook to be used in the Cube.

After explaining my surface to the Professor, he explained to me and the class that this surface was a shadow of a flat torus. A torus is the surface that results from rotating a circle around another circle. The flat torus is a four-dimensional surface that occurs when rotating a circle in the XY plane around a circle in a plane on the Z axis and the fourth-dimensional axis. I will call this fourth coordinate W, meaning that the second circle is in the ZW plane.

The standard three-dimensional ring torus

The Professor went on to explain that the surface I had plotted was a shadow of this flat torus, because a four-dimensional object casts three-dimensional shadows, just as a three-dimensional object casts two-dimensional shadows. The surface was a projection of a four-dimensional surface. Since we cannot visualize a four-dimensional object very easily, we must find ways to represent it in three dimensions.

The shadow of the four-dimensional flat torus

The helix I used to demonstrate two-dimensional shadows

During and after the presentation, Professor Francis gave me some feedback on my efforts at rotation. Adding the extra dimension to another dimension was a close attempt, but really I was just squashing the surface. The Professor had me add in coefficients of the sine and cosine of time to one of these surfaces during the presentation and suddenly I was looking at a shadow of a surface rotating in the fourth dimension.

The Professor started me off by explaining how to rotate two dimensions.

The formulas for rotating X and Y

In this case, the coefficient a is the number of radians of rotation. From this beginning, I realized that I could use these equations to rotate surfaces in higher dimensions as well. I would just need to use multiple rotation constants and multiply each of them. In three dimensions, there are three planes of rotation, XY, XZ and YZ. Therefore, I ended up needing three rotation constants, a, b and c. After working with the equations, I arrived at the equations for rotation in three dimensions.

The equatioons for rotating X, Y and Z

I tested these equations in DPGraph by applying them to the helix, replacing the x, y and z in the equations with the parametric equations, and sure enough, using the slider on a, b and c caused the surface to rotate. (I set the slider to rotate from 0 to 2 Pi so that I could cause the plane to rotate all the way around.) After testing it out on a three-dimensional surface, I tried applying it to its shadow by setting Z equal to 0 and keeping the other two equations the same. By using the sliders, the surface produced was the shadow of the three-dimensional surface, and it could be rotated in any direction.

After this success, I began the task of deriving the equations for rotation in four dimensions. There were six planes of rotation to deal with (the previous three, along with XW, YW and ZW) and so I used constants a through f. The task was simple but tedious, and I ended up with the unwieldy equations for rotation in four dimensions.

The equations for rotation in four dimensions

I tested my formulas on the flat torus in DPGraph by setting W to 0, and replacing the X, Y, Z and W with their corresponding parametric equations. The constants that did not rotate one of the W planes successfully caused the visible surface to rotate without changing the shape, while the other constants caused the surface to change as the four-dimensional flat torus rotated. The formulas were successful.

Using these functional formulas, I got to work on the programming aspect of the project. I decided to use Mathematica, seeing as it had all of the tools I needed readily available and it functioned in the Cube. I first used the formulas to recreate the flat torus, but I did it in such a way that the equations for X, Y, Z and W and their ranges could be easily replaced without changing the formulas. I had essentially finished my project at this point. I had created a program that took the parametric equations for a four-dimensional surface and produced fully rotational three-dimensional shadow out of it that would appear in the Cube. The only shortcoming in my project is the lack of control in the Cube. The surface can be rotated in any direction from the computer, but unfortunately the wand user cannot cause the rotations in the fourth dimension himself. I had hoped to add a button that would cause the rotation, but because I used Mathematica the controls are already set. To change the controls one would need to write the program in a different language or edit the Cube Mathematica program itself.

With my project complete, I was able to apply some new math with some help from the Professor and some of the "Dimensions" videos. Specifically, I was able to understand how complex numbers relate to the fourth dimension. A complex number with a single variable, X, can be plotted in two dimensions. For example, the complex number X = 5 + 4i could not be plotted on a one-dimensional number line because of the imaginary term. However, if we add a second axis, we can account for the real X's and the imaginary iX's. Carrying this over, complex numbers with two variables X and Y, can be plotted in four dimensions: X, Y, iX and iY. With this new knowledge, the Professor had me plot several new surfaces to demonstrate this concept. It is my hope that the project will be useful to future Math 198 students who wish to examine the fourth dimension or two complex numbers will be able to put my program to use.

### Instructions:

Using Surf4D is simple, especially if you are familiar with Mathematica. First, under the first heading "Defining the Functions" set the parametric equations for X, Y, Z and W of the surface you want to view. Then, set the ranges for u and v. Make sure to evaluate the statements by pressing shift and return.

Under the second heading "Projecting the Shadow", there should be no need to edit anything. Make sure to evaluate all of the statements, and then you will be able to examine and rotate the shadow, using the sliders to rotate in the fourth dimension.