Date: May 12, 2001 4:16 PM Author: Kirby Urner Subject: [math-learn] Geometry Lab (Part 1 of 2)

A Math Computer Lab

by Kirby Urner

Oregon Curriculum Network

May 12, 2001

[

Note: this math lab follows on a 2 part talk on geometry

archived at the Math Forum:

http://www.mathforum.com/epigone/math-learn/bimferdkha

http://www.mathforum.com/epigone/math-learn/jordanyoi

]

In my recent talk on geometry, I explored the ratio known as the

divine proportion or phi. This led us to the five-fold symmetric

members of the Platonic set of polyhedra. Here's a listing of

the five Platonics, with their inventories of vertices, faces

and edges, plus the dual of each shape:

V F E Dual

Tetrahedron 4 4 6 Tetrahedron

Cube 8 6 12 Octahedron

Octahedron 6 8 12 Cube

Icosahedron 12 20 30 Pent. Dodecahedron

Pentagonal Dodecahedron 20 12 30 Icosahedron

Remembers Euler's Law: V + F = E + 2. If you know the inventory

of any two of these (V,F or E), you can compute the third.

Another useful generalization is Descartes' Deficit: the number of

degrees around all vertices (adding surface angles) will be 720

degrees less than 360 degrees * the number of vertices. Note that

720 is the number of degrees in a tetrahedron, so you could write:

360 * len(anypoly.vertices) =

sigma(anypoly.angles()) + sigma(tetrahedron.angles())

sigma, as you may recall, just sums a list of terms. If

anypoly.angles() returns a list of degree measures, then sigma

(anypoly.angles) would be the equivalent of the Python expression:

reduce(add,anypoly.angles).

In traditional math book notation, we substitute the capital greek

letter 'sigma' for sigma. If we want to reduce(multiply, terms)

instead of reduce(add, terms), we symbolize this with the capital

letter 'pi' (small pi is the ratio between the circuference of a

circle and its diameter). See handout.

Example:

>>> from operator import add

>>> tetrahedron = rbf.Tetra() # create a tetrahedron object

>>> cube = rbf.Cube() # and a cube object

>>> tetrahedron.angles() # method to list angle measures

[60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0, 60.0,

60.0, 60.0, 60.0]

>>> def sigma(terms):

return reduce(add,terms)

>>> sigma(tetrahedron.angles())

720.0

>>> cubeangles = cube.angles()

>>> len(cubeangles) # number of surface angles in a cube

24

>>> len(cube.vertices) # number of vertices in a cube

8

>>> 8*360 # number of vertices in cube * 360

2880

>>> sigma(cubeangles) # adding all cube surface angles

2160.0

>>> sigma(cubeangles) + sigma(tetrahedron.angles()) # OK!

2880.0

I also talked about duals and structural duals in particular, and how

you could combine a polyhedron with its own structural dual to make

yet another polyhedron. For example, the regular tetrahedron,

combined with its own structural dual, another tetrahedron with edges

at 90 degrees to the original, forms a cube -- we might call it a

"duo-tet cube" as it is defined by these two tetrahedra. Likewise,

the cube and its dual, the octahedron, combine to define the rhombic

dodecahedron, a space-filler of volume 6 when ratioed to the original

tetrahedron's volume of 1.

Relative Volumes Table:

Tetrahedron 1 # regular, defined by 4 packed spheres

Cube 3 # defined by tetra and its struct dual

Octahedron 4 # structural dual of cube

Rhombic Dodecahedron 6 # octa + cube, contains sphere

Cuboctahedron 20 # centers of 12 spheres around nucleus

Notice I'm filling in the picture with spheres, as the overview we

want to keep in mind is a nested hierarchy of polyhedra embedded in

the context of Kepler's sphere packing lattice. Having this as your

operating environment is going to make spatial geometry a lot more

accessible and intuitive.

So in my talk the question arose: what if we combine the rhombic

dodecahedron with its structural dual? What shape do we get? I said

we'd take this up in a computer lab. So here we are.

This is a good application for Qhull, a freeware package that will

accept a list of points, expressed in XYZ coordinates, and return the

maximum convex polyhedron that these points, or a subset thereof,

define. So all we need is a list of vertices, plus a way of

displaying the result. On a UNIX box, Qhull will display directly

to GeomView, but since that's not our OS of the moment, we'll use

some pre-written Python utilities to convert Qhull's output to

POV-Ray, the ray tracer.

Qhull wants a text file that looks like this:

3 #3D file

200

4.0 2.0 0.0

4.0 -2.0 0.0

-4.0 2.0 0.0

-4.0 -2.0 0.0

4.0 0.0 2.0

4.0 0.0 -2.0

-4.0 0.0 2.0

...

the 3 means we're using the 3 XYZ axes, the 200 tells how many

points are included, and then we append a list of those points in

XYZ format (I didn't include all 200).

So we need to create such a list. The rhombic dodecahedron has

14 vertices, and the cuboctahedron has 12, so that'll be a total

of 26 vertices.

When Qhull is finished, it'll output a file that looks like this:

3

200 14 36

4 2 0

4 -2 0

-4 2 0

-4 -2 0

<<snip>>

-1 0 1

-1 0 -1

0 1 1

0 -1 1

0 1 -1

0 -1 -1

4 5 1 4 0

6 8 0 4 12 20 16

4 10 18 8 16

4 7 2 6 3

6 13 23 19 9 1 5

6 8 18 22 13 5 0

6 2 7 15 22 18 10

4 22 15 23 13

6 14 6 2 10 16 20

6 7 3 11 19 23 15

4 11 17 9 19

6 9 17 21 12 4 1

6 14 21 17 11 3 6

4 12 21 14 20

That is: a 3 for 3 XYZ axes, a repeat of the 200 points, followed by

a list of 14 faces for a total of 36 edges. A face begins with a

number indicating how many vertices it has. Then it gives a list of

those vertices, starting its numbering from 0. In other words,

vertex 0 is at the top of the list, and has XYZ coordinates <4,2,0>.

The convex hull or polyhedron being described above is comprised of

4- and 6- sided polygons. Notice also that it doesn't use nearly all

of the 200 points given, but only 0-23. That means the rest of the

points must fall inside the convex hull being described -- Qhull

automatically leaves them out of the final construction.

Remember that changing the size of a polyhedron will alter the edge

lengths, meaning surface area and volume will change by a 2nd and 3rd

power of the linear scale factor. In dealing with our cuboctahedron

+ rhombic dodecahedron, we want a structural dual pair. This means

we'll either need to scale up the rhombic dodecahedron listed in the

volumes table, or scale down the cuboctahedron, as these two don't

have intersecting edges as supplied.

Here's an opportunity to exercise your understanding of the

relationship between volume and linear scale factor. I'm going to

give you the fact that the volume ratio between the cuboctahedron and

its structural dual, the rhombic dodecahedron, is 80:81. Lets take

the cuboctahedron of volume 20. By what linear scale factor do we

need to multiply the rhombic dodecahedron of volume 6, in order to

make it the structural dual of the cuboctahedron? We'll call this

mystery number 'scalefactor'. Let's pause for awhile and see what

we come up with.

The polyhedra we need are already defined in a Python module called

rbf (named for R. Buckminster Fuller -- because we're using his way

of nesting polyhedra, with the tetrahedron as our unit of volume). So

let's boot Python, grab a rhombic dodecahedron and cuboctahedron, and

scale up the former by scalefactor, and display them together using

Povray.

We've done stuff like this before:

>>> from rbf import *

>>> c = Cubocta() # grab a cuboctahedron

>>> r = Rhdodeca() # grab a rhombic dodecahedron

>>> r = r*scalefactor # scale r by the mystery number, make bigger

>>> c.volume

20.0

>>> r.volume

20.25

>>> c.volume/r.volume # what's the c:r volume ratio?

0.98765432098765427

>>> 80.0/81.0 # check! (matches the fact I gave you)

0.98765432098765427

>>> canvas2 = Povray("view2.pov") # initialize an output file

>>> c.display(canvas2) # write c to the file

rbf.Cubocta,0

>>> r.display(canvas2) # ...and r

rbf.Rhdodeca,0

>>> canvas2.close() # close the file and render

Here's the picture, upon rendering (with a caption added in

PaintShop):

http://www.inetarena.com/~pdx4d/ocn/graphics/c&r.gif

So now all we need are the XYZ coordinates of polyhedra c and r,

written out to a text file in the format Qhull expects. I'll give

you a clue as to how you might proceed. The following code will

output a list of either poly's XYZ coordinates. I don't show all

the XYZ tuples -- remember you'll be getting 12 and 14 for the

cuboctahedron and rhombic dodecahedron respectively.

>>> [getattr(i,'xyz') for i in c.vertices.values()]

[(0.70710678118654724, 0.70710678118654735, 0.0),

(-0.70710678118654735, -0.70710678118654724, 0.0),

(0.70710678118654724, -0.70710678118654724, 0.0),

(0.0, -0.70710678118654724, -0.70710678118654724),

(-0.70710678118654724, 0.70710678118654724, 0.0),

...]

>>> [getattr(i,'xyz') for i in r.vertices.values()]

[(0.0, 0.0, -1.0606601717798207), (-1.0606601717798207, 0.0, 0.0),

(0.0, -1.0606601717798207, 0.0), (0.0, 1.0606601717798207, 0.0),

(1.0606601717798207, 0.0, 0.0), ...]

So now your only job, after finding the mystery scale factor, is

to get these formatted the way we want in a text file. You may work

in pairs. See what you can accomplish in 45 minutes. If you're not

done by then, you might want to try finishing before our next lab,

which is when we'll boot Qhull, get an output file, and render the

result. I'll be available to provide more clues if you need them.

<< to be continued >>

To unsubscribe from this group, send an email to:

math-learn-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/