<<

Quasi.py: An Investigation into Tessellating Three-Space with

Michael J. Mangialardi Math 198: Hypergraphics 2006 University of Illinois at Urbana-Champaign

Abstract continuous lines when the was properly assembled. However, this The purpose of this exercise is to method was not perfect, as it can come to create a program that generates an pass that legal moves produce an error aperiodic lattice of three-dimensional and must be replaced. quasicrystals. This was accomplished using Then, in 1980, Dutch the DeBruijn dual method. This method mathematician Nicolas DeBruijn came up involves taking a star of vectors, each with two methods of repeating steps to direction normal to a face of a generate these non-repeating . , and drawing planes normal The first of these is the projection to those vectors on unit intervals away method, in which the vertices of a higher from the origin. Then, at each point where dimensional lattice of cubes is put through three or more planes intersect, transport a mathematical test and those that pass are the original vectors and add them, and a projected into lower-dimensional space is formed. By cycling through and become the nodes of the all points of intersection, an aperiodic quasicrystals. DeBruijn’s second method, lattice is formed. the dual method is the superior of the two and goes as follows. First, define a star of vectors that a perpendicular to the sides of a dodecahedron. Then, construct planes at Background unit intervals along the vectors. At each point where three planes intersect, In 1974, mathematician and transport the original vectors and perform physicist Robert Penrose discovered that the vector addition of the vectors, and he could tessellate a two dimensional either a fat or a skinny rhombohedron, space quasiperiodically with two figures, a analogous to the fat and skinny rhombi of fat rhombus and a skinny one. This Penrose’s two dimensional , is tessellation is called quasiperiodic because drawn. If this is performed at every the pattern has no translational , location where three planes intersect, a yet it has five-fold rotational symmetry, quasiperiodic lattice is formed. something which was previously not thought to exist for . Penrose soon discovered a challenge in creating these tessellations: describing a foolproof Method rule set which does just that. He attempted to do so, along with the This program uses the DeBruijn reclusive mathematician , dual method to generate the desired by decorating the tiles with bars that form quasiperiodic lattice of rhombohedra. This method involves taking a star of vectors, each with direction normal to a face of a which to connect the vertices. The dodecahedron, and drawing planes normal method then creates a drawable node for to those vectors on unit intervals away every index node and defines those from the origin. Then, at each point where drawable nodes to be line strips, drawing three or more planes intersect, transport the quasicrystal. the original vectors and add them, and a Lines 74-149 define the quasicrystal is formed. By cycling through calculatePosition method, given three all points of intersection, an aperiodic vectors, calculates the positions of lattice is formed. intersection of the planes defined by those This program makes use of the vectors, which give the positions of the syzygy library and the distributed scene- rhombohedra. This method takes three graph framework. This framework works vectors and the material node that will be by establishing a tree in which every node parent to the drawn rhombohedra as has the properties of its parent nodes and arguments. Because each vector defines passes on its traits to its daughters; nodes several planes, each spaced Nτ away from correspond to things such as materials, the origin, where N is a non-zero integer indices, drawables, transforms, and other and τ is the , the first thing things necessary for computer graphics. that this method does is create a set of For more information on the syzygy nested while loops so that each distributed scene-graph framework, see permutation of planes can be accounted Ben Schaeffer’s paper on the subject. for. Then, for each plane, it generates its What follows is a line-by-line explanation equation in the form: of how that method was implemented in Px + Qy + Rz = C quasi.py in order to draw that lattice. where:

Lines 1-5 import the syzygy C = Px0 + Qy0 + Rz0 library, as well as other libraries that are and P, Q, and R are the x, y, and z necessary for use in the program. Lines 6- ! components of the vector normal to the 32 are the default navigator as defined by plane. Then, Cramer’s rule is used to Ben Schaeffer in his Cosmos.py. These ! determine if and where the planes lines define how the user navigates within intersect. If the determinant of the the program. coefficients matrix is equal to zero, then Lines 33-73 are where the the planes do not intersect and the drawQuasiCrystal method is defined. method moves on and calculates the This method, as its name implies, draws a position of the rhombohedron and draws quasicrystal. It takes as arguments the it using the drawQuasiCrystal method three vectors that will define the generated defined above. solid, the x, y, and z coordinates of the Lines 150-171 define the “zero” vertex of the quasicrystal, and the addLights method. This method takes the material node that will become the parent root node as an argument and creates two of the quasicrystal. This method first white lights as daughters to the root node. creates a node to function as the set of Lines 172-179 set up the points defining the vertices of the distributed scene-graph framework, set rhombohedron to be drawn as a daughter the root node, and set buffer swap to of the material node passed as an manual. Lines 180-197 translate argument. Then it creates a series of index everything so that it is in front of the nodes as daughters of the points node viewer, set the navigation node, call the which will tell their corresponding addLights method, and create a material daughter drawable nodes the order in node and set the material properties of the The greatest challenge in writing rhombohedra. Lines 198-207 define the quasi.py is the fine tuning of the star of vectors that will be used to to generate the calculate the position of the rhombohedra. There are several upgrades rhombohedra. Lines 208-249 call the planned for future versions of quasi.py calculatePosition method for each First, a proper algorithm for selecting possible combination of three vectors and where to draw rhombohedra needs to be output a countdown so that the user developed because the current one, where knows that the program has not stalled the only criterion to be met is that the during the lengthy process of calculating determinant cannot be equal to zero, is the positions. Finally, lines 250-259 too permissive. Second, it would be nice establish the main loop of the program, to draw the rhombohedra one at a time so swap the buffers, update the navigator, that the user can see the being and set the viewer. created one rhombohedron at a time. Finally, it has been proposed to allow the user to select rhombohedra one at a time Execution and toggle whether the selected rhombohedron is viewed as a wire frame, To run the program, syzygy as a solid, or as a partial solid. version 1.0, Python version 2.4, and a I would like to thank George UNIX shell must be installed Then, Francis and for their help in complete the following steps: developing the algorithm to calculate the 1. Open the UNIX shell. position of the rhombohedra. I would also 2. Navigate to the directory in which like to thank Ryan Mulligan and Kyle syzygy is installed. Wilkinson for helping to debug the code. 3. Start syzygy. 4. Navigate to the directory in which quasi.py is located. Sources 5. Type python quasi.py into the UNIX shell 1. Robbin, Tony. Shadows of Reality. New Haven, Connecticut: Yale University Press, 2006. Conclusion 2. Levine, Dov et al. “Quasicrystals with Arbitrary Orientational Symmetry,” Physical Review. 32(8):5547-50, October 1985.