Sunday, March 20, 2011

Platonic Polyhedrals

A few weeks ago I found out that Blender comes with a script for generating various types of regular solids and decided to try it out when I got the chance. Being (a) a mathematician, and (b) a geek (not necessarily in that order), I opted to check out the Platonic solids by making a set of gaming dice (otherwise known as polyhedrals).

Here you can see all five of the Platonic solids. From left to right we have a tetrahedron, a cube or hexahedron, an octahedron, a dodecahedron, and an icosahedron. There are many ways you can define Platonic solids, but one of the simplest is that they are the solids you can make with every face being the same shape, having no gaps between them. It is easy to show that no more than five can exist in three dimensions; in four dimensions, there are six, and in all dimensions higher than four there are only three. Such dice have been around for a long time; icosahedral dice have been found from as far back as the second century AD (maybe the Romans were into role-playing games?).

The Platonic solids are the only regular solids possible, but there are other sets of solids that conform to certain rules, such as the Archimedean and Catalan solids. They're a bit more complicated so I won't get into them here, but I like this part of geometry because it's more visual than most of math.

The dice shown above are traditional in that the sum of opposite sides is equal to one higher than the number of faces (except for the tetrahedron, which doesn't have opposite faces). For example, on the cube, 1 and 6 are on opposite sides, to give a total of 7. Likewise, 2 and 5 and 3 and 4 are on opposite sides. In the same way the sum of opposite sides of the octahedron is 9, of the dodecahedron 13, and of the icosahedron, 21. I don't know what other conventions apply to the placement of numbers on dice besides that, so the exact layout is entirely my own.

(Warning: the section below is slightly technical, and more of a personal review of what I learned from this project. If you are not into computer graphic design, feel free to skip this portion. If you are, you may find it interesting and possibly learn something.)

I also used this project as an excellent opportunity to practice UV-unwrapping. UV-unwrapping is the process by which you take a 2-dimensional image and map it onto an object so that it affects various parts of the appearance of the object. The name comes from the fact that two coordinates are needed for the map, but since x, y, and z are already taken, u and v are used (they're commonly used in mathematics for such purposes). The UV-unwrapping in this case was fairly easy because I could mentally follow the cuts in the mesh necessary to lay them out flat with no distortion (even though I made it harder for myself by beveling the edges, which created more surfaces). Each die has two image maps on it: one for the color, a base dark-green color with the numbers in white, and one that causes the numbers to be depressed (the swirly light-green color comes from a distorted noise texture added on top).

 The depressed number are an example of what is known as bump mapping. If you were to examine the actual meshes used to create this image, you'd see every face as smooth as every other face. What the bump map does, is tell the renderer to treat certain areas as if they were elevated or depressed for the purposes of shading. This is an incredibly powerful tool for rendering high levels of detail that would be prohibitively hard to do by actually changing the mesh; combined with UV-mapping you can really bring a blank mesh to life.

Anyway, I've analyzed this enough, and I should probably get to bed now. Tomorrow  later this morning I'm taking my housemate Jonathan up to Mauna Kea on a summit tour for the first time. A hui hou!

No comments:

Post a Comment

Think I said something interesting or insightful? Let me know what you thought! Or even just drop in and say "hi" once in a while - I always enjoy reading comments.