Polyhedra Graphics, I

I decided, finally, to take the big plunge. I’ve been steadily working on my polyhedra textbook (I’ve discussed this in My Polyhedra Textbook, I and My Polyhedra Textbook, II), but ran into a bit of a snag. Since I wrote those posts, I self-published The Puzzle Cabaret, and given what I learned in the process, decided to self-publish my polyhedra book.

The snag? All my three-dimensional graphics are in color, and given that the book will approach 500 pages, would be prohibitively expensive to print in color. It would cost about $35 to print, but I want to sell it for less than that – the idea is for it not to be too expensive, so anyone with an interest in polyhedra can reasonably afford it. It would only cost about $6 to print in black and white.

The small rhombidodecahedron

You might think, “Well, just convert to grayscale!” But what happens is that a brightly colored red tetrahedron, when converted to black and white, gives you a flat, dark gray tetrahedron — the one on the left — which is not very pleasing. And given that most polyhedra graphics on the web are similarly colored (and include some vertex/edge features which do not appeal to me), a simple conversion just won’t do. I’m looking for a tetrahedron with a little more contrast, like the one on the right.

So after a bit of work, that snag will eventually be fixed. I’ll have to redo the graphics one by one, but I have all the original code so I just need to change colors. Doable. But through conversations with Stacy (friend and design consultant), it seemed that for Part II of the book, it would be really nice to have images of all the uniform polyhedra. Really nice.

Well, I thought, that would be tons of work! Did I really think it would add that much to the book? Well, yeah, it probably would. There are programs/algorithms out there to produce polyhedra graphics, and it looked like it was time to take the plunge – dive into the inner workings of these programs and find a fairly simple way to produce the graphics. Sure, I could work them all out for myself – but data for some of the snub polyhedra require solving eighth-degree polynomials, and that’s just to get started!

Turns out I hit the jackpot right away – and that never happens when you’re playing around with this stuff! I found this site, authored by David McCooey. For each uniform polyhedron – and its dual (when it exists) – he lists all the coordinates as well as which coordinates are vertices of which faces.

OK, that might seem like a lot of work, but I’ve worked with polyhedra graphics before. The idea is to use the symmetry of the polyhedron to help you out. So with the tetrahedron above, you just need to specify one face, and then “move it around.” In other words, use the symmetries (represented by 3-by-3 matrices) to create several different faces from one.

What this means is that you usually only need to specify vertices of a small number of faces, then copy them using symmetries to obtain the entire polyhedron. For example, the square and decagon below can be rotated and copied to yield the small rhombidodecahedron shown above.

So far, so good. But how do you represent the symmetries of a uniform polyhedron? Answering this question will be a major topic in this thread — I hope to walk you through a process of creating polyhedra graphics so you can try it on your own.

I’ll assume a basic familiarity with polyhedra – this thread would be impossibly long otherwise! In other words, I’ll assume that if you follow this thread, you’ve already played around with polyhedra a bit – built some, read some introductory books (like Magnus Wenninger’s Polyhedron Models, for example), and/or just stared at pictures of them, teasing out the various relationships among uniform polyhedra.

Also, I’ll need to assume some knowledge of Cartesian coordinates in three dimensions, as well as matrices and linear algebra. Anyone serious about 3D computer graphics needs this knowledge in their conceptual toolbox.

Finally, I’ll assume you’ve some programming platform you’re comfortable with which can produce three-dimensional graphics. I use Mathematica (which is not free), but I’ll discuss creating graphics from an algorithmic (rather than syntactic) point of view, so you can adapt to whatever program you’re using.

Dual of the small ditrigonal dodecicosidodecahedron

For today, I want to show you a few graphics which illustrate the basic geometry involved. If you’re very familiar with polyhedra, these ideas will not be new. But I think it’s important to include them for completeness.

The emphasis is on application, not theory. At the very least, a familiarity with abstract algebra (usually a senior-level course in an undergraduate math major) would be necessary to tackle the theory. That would be a completely different conversation, but not one for this thread.

One important geometrical idea is that a tetrahedron can be inscribed in a cube, as shown below. This might not seem too amazing, but you can’t inscribe an equilateral triangle in a square in two dimensions.

Tetrahedron in a cube

Even more importantly, two tetrahedra can be inscribed in a cube, with no vertices left over. This is truly remarkable! Of course two equilateral triangles cannot be inscribed in a square (the two-dimensional analogue), and in higher dimensions (yes, four and higher!), this does not occur either. But in three dimensions, the simple equation 2 x 4 = 8 (four vertices on a tetrahedron and eight on a cube) works its subtle magic.

Two tetrahedra inscribed in a cube

Moreover, the intersection of these two tetrahedra is an octahedron. Magic! Well, not really. It all derives from 2 x 4 = 8.

Another simple (but magic!) equation is 5 x 4 = 20. A tetrahedron has four vertices, while a dodecahedron has 20. It turns out that five tetrahedra may nicely be inscribed in a dodecahedron, as shown below. And the volume common to these five tetrahedra is an icosahedron.

Five tetrahedra in a dodecahedron

If you look carefully, you can also see that a cube (shown in light gray below) can be inscribed in the same dodecahedron. This will be a great help in finding the matrices which represent the symmetries of the dodecahedron.

Cube inscribed in a dodecahedron

This sequence of a tetrahedron inscribed in a cube in inscribed in a dodecahedron is a special feature of three-dimensional geometry. And one reason why creating polyhedra graphics in three dimensions is actually a bit easier than you might think, as you’ll see in upcoming posts….

My Polyhedra Textbook, II

In my last post, I talked about a textbook I had written to use in a course which, among other things, introduced students to a non-Euclidean geometry — spherical geometry.  And while the primary purpose of the text was for teaching a college-level course, the actual content of the text had a different origin.

As I have mentioned previously, I got interested in polyhedra during graduate school, and was very fond of taking books about polyhedron models out of our mathematics library at Carnegie Mellon.  It was easy enough to photocopy the nets provided, or use the numerical data to construct nets on my own.

But what was missing for me, a mathematician-in-training, was a more rigorous discussion of these intriguing models.  For example, Wenninger’s Polyhedron Models contains many nets with some idea of how to construct them from a more general geometric point of view, but few details.  And his Spherical Models contains many tables of data of angular measures to three decimal places, but many derivations are missing.  Other books included metrical data such as the measures of dihedral and edge angles and circumradii, but again, often only numerically.

I should point out that this is not necessarily a criticism of these wonderful books, since each book had its own purpose.  What I found, though, was that there was really no book out there which took a more mathematically sophisticated viewpoint at an intermediate level.

So I decided that if I wanted to know more about polyhedra — that is, know the exact metrical data associated with polyhedra, not just numerical approximations — I needed to do some work on my own.

I used two approaches — coordinates and linear algebra, and spherical trigonometry.  In both cases, I wanted precise results — so typically, this meant knowing exact values for the cosines of dihedral and edges angles, for example.  When you know the cosine of an angle, you know the angle.

Why the cosine?  The sine has the disadvantage of being ambiguous, since many dihedral angles of polyhedra are obtuse — so you need more information than just the sine of the angle.  Using the tangent involved the troublesome case of \dfrac\pi2 in formulas — which occurred rarely, but was still a nuisance.  Some sources use the tangent of the half-angle, but this often involves additional calculations.

For my geometry course, I focused on spherical trigonometry — recall that I did not want linear algebra as a prerequisite for the course so that it would be accessible to a broader student demographic.  But I still wanted to keep the mathematical rigor — use spherical trigonometry to calculate exact values of the cosines of relevant angles.

To give you an idea of what’s involved, let’s calculate the dihedral angle of a dodecahedron — that is, the angle between any two pentagonal faces of a regular dodecahedron.

Fig25c

To use spherical trigonometry (see a previous post on spherical geometry for a refresher), we imagine a small sphere centered at a vertex of the dodecahedron — it will carve out a spherical triangle, as shown below.

sphdodecahedron

Here, a is a vertex of the dodecahedron, and points b, c, and d are the points where the small sphere intersects the edges of the dodecahedron meeting at a.  This creates a spherical triangle whose sides all have measure 108°, since the interior angles of a regular pentagon all have measure 108°.

The angles between the sides of the spherical triangle with vertices a, b, and c are the dihedral angles of the dodecahedron, whose measure we call D.  We may apply the law of cosines for spherical triangles in order to find (see the relevant Wikipedia page; in the textbook, spherical trigonometric formulas are discussed in detail):

\cos108^\circ=\cos108^\circ\cos108^\circ+\sin108^\circ\sin108^\circ\cos D.

To find \cos D, we need to know the following (also explained in the text):

\cos108^\circ=\dfrac12(1-\tau),\quad\sin108^\circ=\dfrac12\sqrt{\tau+2},

where \tau is the golden ratio.  (I use \tau for the golden ratio as this is the notation Coxeter used in his well-known Regular Polytopes, which inspired generations of polyhedral enthusiasts.)

Solving yields

\cos D=-\dfrac1{\sqrt5},

so that D is approximately 116.6°.

Now this is not the only way to find D; it is possible to find Cartesian coordinates for the vertices of the dodecahedron and use some linear algebra, for example.  But using spherical trigonometry is straightforward and elegant — and is surprisingly versatile.

When I teach my polyhedra course, we use spherical trigonometry to find edge and dihedral angles of all the Platonic and Archimedean solids.  Further, we use spherical trigonometry to design geodesic models, like the 4-frequency icosahedron shown here.

Fig47b.png

So the emphasis is on applying spherical trigonometry to the construction of physical models.  In a typical two-lecture-per-week course, one lecture is always a hands-on laboratory, where we build a polyhedron or geodesic model we studied previously.  We never build a model without knowing precisely how it is designed — we first understand the mathematics of the model, and then we build it.  Included in the text is a week-by-week outline of how I’ve used the text in the classroom.

Now the classroom textbook is just Part I of the book.  Part II is a bit more technical, and intended for the true polyhedral enthusiast.  It turns out that spherical trigonometry is a powerful tool for studying polyhedra.  In fact, the dihedral angles of all the uniform polyhedra may be calculated using spherical trigonometry — even the most complex snub polyhedra.  However, it is sometimes necessary to solve sixth-degree polynomials in order to do so!

I thought to add Part II to the volume as I had already done all the calculations some years ago.  And, to my knowledge, the calculation of the dihedral angles of all the uniform polyhedra using spherical trigonometry has not been published before.  So I hope to contribute something to the literature of classical polyhedral geometry by publishing this book, in a way that someone with a modest mathematical background can understand.

As I continue with the book project, I’ll post updates as I discover interesting geometrical tidbits along the way!

My Polyhedra Textbook, I

Now that I’ve moved on to semi-retirement, there is time to take on a 25-year-old project:  my textbook on polyhedra!

I became interested in polyhedra during graduate school, when I was fascinated by the trio of books by Magnus Wenninger:  Polyhedron Models, Dual Models, and Spherical Models.  I don’t know how many times I checked out Polyhedron Models from the mathematics library at Carnegie Mellon University, but I have clear memories of flipping pages back and forth over and over again, trying to understand the various and subtle relationships among the 100+ models shown in the book.

Of course this prompted me to build my own models — but at a time when there weren’t nets available online.  So I designed my own nets using Postscript.  Since I loved coding, this was no problem at all.  I essentially wrote my own turtle graphics package in Postscript, and used this to create any net I wanted.

Having moved around several times in recent years, I have very few models that I’ve built.  And like many model builders, I’ve given most of them away, anyway.  But here are a few I made for my friend Sandy (whom I’m visiting as I write this post).

 

Eventually I finished graduate school and went on to my first university teaching position, where I stayed for fourteen years.  I was at a small, liberal arts school, where many of the mathematics majors were destined to be middle school or high school mathematics teachers.  Moreover, I was to replace a retiring faculty member who had taught a course entitled, “Higher Geometry.”

I eagerly agreed to take on this mantle, but was interested in shifting the focus.  In particular, I wanted to make the course about polyhedra rather than the usual content of a Higher Geometry course, which often included a lengthy discussion of hyperbolic geometry.

Allow me a moment to step on my pedagogical soapbox here.  Yes, I understand the importance of introducing students to a non-Euclidean geometry.  But as many of my students were prospective teachers, I knew there was really no way they would be able to introduce hyperbolic geometry to their students.

But spherical geometry is also an example of a non-Euclidean geometry, and further, you can actually build physical models of non-Euclidean objects by building geodesic models.  So while you can’t really see that a triangle in hyperbolic geometry has an angle sum less than 180°, you can actually see that a spherical triangle has an angle sum greater than 180°.

You can also look at axiomatics in spherical geometry, with the added bonus that you expose students to the important concept of duality.  Finally, you can ramp up the mathematical content of such a study by introducing students to spherical trigonometry.  I should remark that, very likely, fewer than 1 in 10 (or perhaps even 1 in 100) mathematicians can rattle off the cosine law for spherical triangles — so exposing students to spherical trigonometry is significant.  It’s practical as well — think of flight paths — but I never went into this application as there just wasn’t enough time.

Stepping off my soapbox now…suffice it to say that I was given free reign to retool the Higher Geometry course.

I decided to have the course be centered on spherical trigonometry.  Why?  First, the course needed some substantial mathematical content; spherical trigonometry can be quite challenging, especially some of the more involved derivations.  This also allowed for a fairly detailed study of polyhedra, as the edge and dihedral angles of all the uniform polyhedra can be found using spherical trigonometry.

Now it is possible to find edge and dihedral angles of polyhedra in other ways, but these usually involve linear algebra applied to Cartesian coordinates in three dimensions.  And in the typical undergraduate curriculum, linear algebra follows the calculus sequence.

So if I wanted the course to be accessible to other students — such as those needing a mathematics elective but were too advanced for, say, college algebra — I couldn’t have linear algebra as a prerequisite.

And so a new “Higher Geometry” was born.  I did eventually rename the course to “Polyhedra and Geodesic Structures,” as it was more apt — one main application of spherical trigonometry I introduced was building spherical models, like those described extensively in Wenninger’s Spherical Models.  It was a highly successful course, which I taught off and on at various institutions for about twenty years.  I also conducted any number of workshops for both teachers and students of all ages over the same time span.

Essentially, students and teachers of all ages just loved the hands-on aspect of building polyhedra and spherical models.  They often commented on how building their own models made mathematics “real.”  There was always the added bonus that they got to take their work home with them!

Yes, model building is a fun activity.  But I always made sure to balance content with the hands-on laboratory experience.  We never built any models without understanding some aspect of the geometry underlying the models.

Naturally, that geometry varied with the students involved.  For middle school students, working with spherical trigonometry was far too advanced.  But we could always see how Euler’s formula applies to convex polyhedra.

In my university-level course, we actually proved Euler’s formula using spherical geometry with the method attribute to Legendre; despite others’ claims to the contrary, it is in fact the most elegant proof of Euler’s formula….

And this is just the first part of the book!  In my next post, I’ll say a little more about the genesis of the first part, and then go on to describe the second part of the book.  Expect a long thread about polyhedra and three-dimensional geometry in the upcoming months….

Enumerating the Platonic Solids

The past few weeks, I outlined my approach to a series of lectures on polyhedra.  One of my constraints is that students will not have seen a lot of trigonometry yet, and will not have been exposed to three-dimensional Cartesian coordinates.  But there is Euler’s Formula!  I just finished a pair of lectures on the algebraic enumeration of the Platonic solids using Euler’s Formula, and I thought others might be interested as well.

As a reminder, Euler’s Formula states that if V, E, and F are the number of vertices, edges, and faces, respectively, on a convex polyhedron, then

V-E+F=2.

How might we use this formula to enumerate the Platonic Solids?  We need to make sure we agree on what a Platonic Solid is:  a convex polyhedron with all the same regular polygon for faces, and with the same number meeting at each vertex.

To use this definition, we will define a few more variables:  let p denote the number of sides on the regular polygons, and let q denote the number of polygons meeting at each vertex of the Platonic solid.  (Those familiar with polyhedra will recognize these as the usual variables.)

The trick is to count the number of sides and vertices on all the polygons in two different ways.  For example, since there are F polygons on the Platonic solid, each having p sides, there are a total of pF sides on all of the polygons.

CubeFaces.png

But notice that when we build a cube from six squares, two sides of the squares meet at each edge of the cube.  This implies that 2E also counts all of the sides on the polygons.  Since we are counting the same thing in two different ways, we have

pF=2E.

We may similarly count all the vertices on the polygons as well.  Of course since a regular polygon with p sides also has p vertices, there are pF vertices on all of the polygons.

But notice that when we put the squares together, three vertices from the squares meet at a vertex of the cube.  Thus, if there are V vertices on a Platonic Solid, and if q vertices of the polygons come together at each one, then it must be that qV is the total number of vertices on all of the polygons.  Again, having counted the same thing in two different ways, we have

pF=qV.

Thus, so far we have

V-E+F=2,\quad pF=2E,\quad pF=qV.

Note that we have three equations in five variables here; in general, such a system has infinitely many solutions.  But we have additional constraints here — note that all variables are counting some feature of a Platonic Solid, and so all must be positive integers.

Also, since a regular polygon has at least three sides, we must have p\ge3, and since at least three polygons must come together at the vertex of a convex polyhedron, we must also have q\ge3.

These additional constraints will guarantee a finite (as we know!) number of solutions.  So let’s go about solving this system.  The simplest approach is to solve the last two equations above for E and V and substitute into Euler’s Formula, yielding

\dfrac{pF}q-\dfrac{pF}2+F=2.

Now divide through by F and observe that F>0, so that

\dfrac pq-\dfrac p2+1>0.

Multiply through by 2q and rearrange terms, giving

pq-2p-2q<0.

How should we go about solving this inequality?  There’s a nice trick here:  add 4 to both sides so that the left-hand side factors nicely:

(p-2)(q-2)<4.

Now we are almost done!  Since p,q\ge3, then p-2 and q-2 must both be integers at least 1; but since their product must be less than 4, they can be at most 3.

This directly implies that p and q must be 3, 4, or 5.

This leaves only nine possibilities — but of course, not all options need be considered.  For example, if p=q=5, then

(p-2)(q-2)=9>4,

and so does not represent a valid solution.  But when p=3 and q=4, we have the octahedron, since p=3 means that the polygons on the Platonic Solid are equilateral triangles, and q=4 means that four triangles meet at each vertex.

So out of these nine possibilities to consider, there are just five options for p and q which satisfy the inequality (p-2)(q-2)<4.  And since each pair corresponds to a Platonic Solid, this implies that there are just five of them, as enumerated in the following table:

PlatonicChart

Actually, this implies that there are at most five Platonic Solids.  How do we know that twelve pentagons actually fit together exactly to form a regular dodecahedron?  A further argument is necessary here to be complete.  But for the purposes of my lectures, I just show images of these Platonic Solids, with the presumption that they do, in fact, exist.

Now keep in mind that in an earlier lecture, I enumerated the Platonic Solids using a geometrical approach; that is, by looking at those with triangular faces, square faces, etc.  I like the problem of enumerating the Platonic Solids since the geometric and algebraic methods are so different, and emphasize different aspects of the problem.  Further, both methods are fairly accessible to good algebra students.  The question of when to take an algebraic approach rather than a geometric approach to a geometry problem is frequently difficult for students to answer; hopefully, looking at this problem from both perspectives will give students more insight into this question.