Polyhedrons II

In case you’ve forgotten what those beasts are, here are the five regular polyhedrons, plain:

polyhedsPlainRadius

– and stellated, that is, with pyramids on each of their 4, 6, 8, 12, and 20 faces respectively:

polyhedsStel08

They were used as stars in the cover picture of Astronomical Calendar 2015.

I tried to describe my struggle to program their geometry, ending with the part I found most intractable, the amount of lighting on the facets of the stellation pyramids, which is needed to make them look solid:

“With plain polyhedrons it’s easy: assuming that light comes from the top, then a face is light-colored in proportion to its latitude, which is how much it looks upward. But to calculate this for the faces of the stellation pyramids has been vexingly difficult. These faces are all triangles in space, and a way would be to calculate the position of any point on a line erected vertically from the triangle. After failing with all the trigonometry I knew (all the math I know is self-taught) I even appealed to Dr. Math, a website apparently run by selfless volunteers. Dr. Math kindly sent me a careful explanation, embodying cross-products, of which I had never heard. I did my best to embody this into my program, and it has not worked. I hope somebody yet will show me how to erect a line on a triangle in space.”

As several readers reassuringly told me, the shadings of color in the stars of the cover picture looked roughly right. But that had come about only because, after transferring my picture, plotted with Adobe Illustrator, into Photoshop, I had clicked on several of the facets of every star and changed the strength of their colors to what looked better.

Parker Moreland responded to my appeal. Though 83 and living in a care home in Connecticut, he has fluent ability with several kinds of tablet and smartphone and laptop device, plenty of cheerful patience, and a physicist’s knowledge of math. He told me “I was taught Fortran by IBM in Washington, DC in 1960 while I was a 1st Lt. in the Pentagon.” He re-explained vectors and cross-products to me, adding: “The beauty of the vector cross-product of two vectors for your problem,… is that it results in a vector pointing in a direction normal (perpendicular) to the plane defined by the two vectors!  Almost magic!  And more amazingly, the length of the new vector is equal to the area of the parallelogram defined by the two original vectors!”

When I tried to incorporate his equations, and got as bad a result as before, he stayed with me, until at length I realized the mistake was mine and in a different layer of the programming. (I had left out one of the transformations between frames of reference, of which there are three: from the viewpoint to the center of the imaginary sphere of space, from that center to the center of the polyhedron, and from that to the polyhedron’s points.) So now it worked, and probably the equations Dr. Math had given me were the same and would have worked too. It worked, except that the perpendicular stick from the triangle pointed sometimes up and sometimes down, in an apparently unpredictable way, so I struggled to find yet another algorithm: for whether a facet of a stellation pyramid is on its upper or downward side. After at last doing so, I realized I could probably have found an easier way if I had understood something else latent in Parker’s explanations: that the stick points up if you take the points of the triangle clockwise (as seen from above), down if you take them counterclockwise.

Having worried my way past this knot, I can now go ahead and indulge in further tuning of my program.

polyhsColored

You may notice that I also caught a previous mistake in the geometry of the stellations on the icosahedron (the last in the row). It now shows beauties comparable with the dodecahedron’s.

More on polyhedrons to come.

Write a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.