Myself and my brother have been talking about this for a bit and Escape seems like a good excuse to get it done. We're going to make a monkey trapped in a hypercube. This image will make more sense as we go along:
Hi everyone, I'm Ruskeydoo's brother. I'm a mathematician and mathematical artist. I mostly do 3d printed stuff. I use Rhinoceros for my 3d design, with a large amount of procedural generation using python scripts. Most of my work can be see in my Shapeways shop.
Ok, what are we doing to this poor monkey? Well first, here is our extremely low poly test monkey:
Yes he has a wonky leg, we will fix that later. He is inside of a cube, and has one limb (including head and tail) at each of the 6 faces of the cube.
We promised a hypercube though, not a cube... but first, what is a hypercube?
A hypercube, or tesseract, is the 4-dimensional version of the ordinary 3-dimensional cube. Just as you can make a cube by taking two copies of a square and drawing lines between the corresponding corners, you can make a hypercube by taking two copies of a cube and drawing lines between those corresponding corners. The trick though is to make all the lines that meet at a corner be at 90 degrees to each other. This isn't possible in 3d for a hypercube, so you need 4d.
Another way to think about it: we can draw a 3d cube with it's corners at (1,1,1), (-1,1,1), (1,-1,1), and so on - that is we put a point at plus or minus 1 in each coordinate. Since there are 8 ways to choose the plusses and minuses, you get the 8 corners of the cube. Now just do the same in 4d: put a point at (1,1,1,1), another at (-1,1,1,1) and so on. You get the 16 corners of a hypercube.
Ok, so just as the 3d cube has 6 square faces, the 4d hypercube also has faces. It has 8 cube faces. These are the 8 cubes you see in Dali's Crucifixion (Corpus Hypercubus) painting. In that painting they are "opened out" and drawn in 3d space, just as you can open out the 6 square faces of a cube and draw them in 2d (a net, pretty much what you do when unwrapping a model for UV texturing).
Our monkey is going to be inside of one of the 8 cube faces of a hypercube. Actually it's a bit worse for him than that. There's an identical copy of him in each of the other 7 cubes as well. That's why his limbs are sticking out through the faces of the cube he's inside of - he's grabbing onto the limbs of his copies in the other cubes. You can also think of it as if there is only one monkey in one cube, but the faces of the cube are all connected to each other, Portal style. So when he looks through one of the faces of the cube he sees himself from another angle.
How are we going to show his predicament? We're also going to have to distort him in order to really show him and his 7 copies in the one shot. The next paragraph is rather technical, feel free to skip.
We put the monkey and 3d cube into 4d by mapping (x,y,z) for each vertex of the mesh in R^3 to (1,x,y,z) in R^4. In order to be able to show the faces of the 4d hypercube back on our 2d computer screens using our puny 3d visual systems and brains, we need to get it back into R^3. We do this as follows. First we radially project the monkey onto the unit sphere in R^4 (also known as S^3), by dividing the vector (1,x,y,z) by its length. Then we stereographically project from S^3 to R^3. We have to be careful to choose our projection point for stereographic projection away from the monkey. If we chose a point inside the monkey, we would fill up the entire universe with monkey. So, we choose a point at one of the corners of the hypercube. To get his copies in the other cubical faces of the hypercube, we translate him around S^3 by using quaternion multiplication. His 7 copies are the result of multiplying by i, j, k, -1, -i, -j and -k before stereographically projecting to R^3.
And here's what he looks like, trapped in the faces of the hypercube with his 7 copies.
Next steps: Make a better monkey, worrying about the angle distortion that happens near the faces of the cube. Texture the monkey. Figure out if the texture data for the monkey will survive the distortion, and fix it if it doesn't.
Going to be going quite stylized. We're going to 3d print it and we don't want the smaller inner monkeys to look like they're missing detail. Been working loads in TF2 recently so will probably be something along those lines.
I got the textures working on a distorted mesh, so I think we are in business. I just exported the distorted mesh as an obj file, opened it in a text editor and copy-pasted the vertex position lines over those lines in the original obj file (which has the texture information).
Replies
(ps hi kritzkast)
Ok, what are we doing to this poor monkey? Well first, here is our extremely low poly test monkey:
Yes he has a wonky leg, we will fix that later. He is inside of a cube, and has one limb (including head and tail) at each of the 6 faces of the cube.
We promised a hypercube though, not a cube... but first, what is a hypercube?
A hypercube, or tesseract, is the 4-dimensional version of the ordinary 3-dimensional cube. Just as you can make a cube by taking two copies of a square and drawing lines between the corresponding corners, you can make a hypercube by taking two copies of a cube and drawing lines between those corresponding corners. The trick though is to make all the lines that meet at a corner be at 90 degrees to each other. This isn't possible in 3d for a hypercube, so you need 4d.
Another way to think about it: we can draw a 3d cube with it's corners at (1,1,1), (-1,1,1), (1,-1,1), and so on - that is we put a point at plus or minus 1 in each coordinate. Since there are 8 ways to choose the plusses and minuses, you get the 8 corners of the cube. Now just do the same in 4d: put a point at (1,1,1,1), another at (-1,1,1,1) and so on. You get the 16 corners of a hypercube.
Ok, so just as the 3d cube has 6 square faces, the 4d hypercube also has faces. It has 8 cube faces. These are the 8 cubes you see in Dali's Crucifixion (Corpus Hypercubus) painting. In that painting they are "opened out" and drawn in 3d space, just as you can open out the 6 square faces of a cube and draw them in 2d (a net, pretty much what you do when unwrapping a model for UV texturing).
Our monkey is going to be inside of one of the 8 cube faces of a hypercube. Actually it's a bit worse for him than that. There's an identical copy of him in each of the other 7 cubes as well. That's why his limbs are sticking out through the faces of the cube he's inside of - he's grabbing onto the limbs of his copies in the other cubes. You can also think of it as if there is only one monkey in one cube, but the faces of the cube are all connected to each other, Portal style. So when he looks through one of the faces of the cube he sees himself from another angle.
How are we going to show his predicament? We're also going to have to distort him in order to really show him and his 7 copies in the one shot. The next paragraph is rather technical, feel free to skip.
We put the monkey and 3d cube into 4d by mapping (x,y,z) for each vertex of the mesh in R^3 to (1,x,y,z) in R^4. In order to be able to show the faces of the 4d hypercube back on our 2d computer screens using our puny 3d visual systems and brains, we need to get it back into R^3. We do this as follows. First we radially project the monkey onto the unit sphere in R^4 (also known as S^3), by dividing the vector (1,x,y,z) by its length. Then we stereographically project from S^3 to R^3. We have to be careful to choose our projection point for stereographic projection away from the monkey. If we chose a point inside the monkey, we would fill up the entire universe with monkey. So, we choose a point at one of the corners of the hypercube. To get his copies in the other cubical faces of the hypercube, we translate him around S^3 by using quaternion multiplication. His 7 copies are the result of multiplying by i, j, k, -1, -i, -j and -k before stereographically projecting to R^3.
And here's what he looks like, trapped in the faces of the hypercube with his 7 copies.
Next steps: Make a better monkey, worrying about the angle distortion that happens near the faces of the cube. Texture the monkey. Figure out if the texture data for the monkey will survive the distortion, and fix it if it doesn't.
I gave up trying to figure it out, felt like my head was going to explode
very cool concept man
What kinda of art style are you thinking of for this, are you leaning more towards realism or stylized?