Date: May 13, 2001 11:44 AM Author: Kirby Urner Subject: [math-learn] Geometry Lab (Part 2 of 2)

A Math Computer Lab

Part 2

by Kirby Urner

Oregon Curriculum Network

May 13, 2001

[ Part 1 of this Geometry Lab is archived at:

http://groups.yahoo.com/group/math-learn/message/744

]

Firstly, let's go over finding that mystery scale factor, which

grows the volume 6 rhombic docahedron such that it has an 81:80

volume relationship with the cuboctahedron of volume 20.

c:newr = 20:newr = 80:81

So c/newr = 80/81, and 81*c/80 = newr = 20.25, or 81/4.

r.volume = 6, but we want it to become 81/4.

6*x = 81/4

x = 81/24 = 27/8

But it's the 3rd root of x that will be our linear scale factor,

since volume changes as a 3rd power of linear change. So what's

the 3rd root of 27/8? Answer: 3/2.

Secondly, we needed to get our coordinates listed in the format

Qhull understands. One method might involve cutting and pasting.

Open a new, blank window and write:

3 #3D file

26

at the top. Then we need lists of XYZ coordinates without braces.

Using the clues I gave you last time, you could do something like

this:

>>> from rbf import *

>>> r = Rhdodeca()

>>> r = r*(3.0/2.0)

>>> xyzlist = [getattr(x,'xyz') for x in r.vertices.values()]

>>> for point in xyzlist:

print "%s %s %s" % point

0.0 0.0 -1.06066017178

-1.06066017178 0.0 0.0

0.0 -1.06066017178 0.0

0.0 1.06066017178 0.0

1.06066017178 0.0 0.0

-0.53033008589 0.53033008589 0.53033008589

0.0 0.0 1.06066017178

0.53033008589 0.53033008589 -0.53033008589

0.53033008589 -0.53033008589 0.53033008589

0.53033008589 -0.53033008589 -0.53033008589

-0.53033008589 -0.53033008589 -0.53033008589

-0.53033008589 -0.53033008589 0.53033008589

-0.53033008589 0.53033008589 -0.53033008589

0.53033008589 0.53033008589 0.53033008589

Then just cut and past that chunk of information to your new file.

Do the same for the cuboctahedron. Save as rcdual.txt or some such,

and you're done. If you had a more elaborate solution, that's great.

Anyway, take about 15 minutes to create this text file if you

haven't already, or move directly to using Qhull below. If you

finish early, you'll have more time to tweak Povray and develop

fancier renderings.

Now we're ready to run Qhull.

The command line format is:

> qhull < input.txt o E0.000001> output.txt

To avoid path issues, the easiest thing will be to copy your

rcdual.txt right into qhull's working directory.

The E parameter is necessary to keep qhull from trying to be

*too* precise when it figures out which points belong to the

same face. Our operating level of precision isn't really out

to the final decimal place, and if we let qhull take its

analysis to that level, it will enforce standards of

coplanarity that exceed our requirements, and give us an

all-triangle-faceted shape.

Povray won't draw a face if the points given it aren't coplanar

within a very narrow range. If Povray still gives us faces, vs.

warnings that it has to ignore our polygon instructions, this

is evidence that our resultant shape is flat-faced.

Of course the best proof would be algebraic/symbolic, so lets

put a bookmark here for a future project. We also need to do

some more algebra to show why the 80:81 volume ratio, between

the cuboctahedron and its structural dual, is really correct.

Remember I gave that to you as a starting place, and you used

that to derive a scale factor.

The file you get back from Qhull will look like this:

3

26 24 48

0.707106781187 0.707106781187 0

-0.707106781187 -0.707106781187 0

0.707106781187 -0.707106781187 0

<< snip -- repeat of the vertices >>

-0.53033008589 0.53033008589 -0.53033008589

0.53033008589 0.53033008589 0.53033008589

4 11 18 10 17

4 25 9 18 11

4 4 15 11 17

4 13 4 17 10

4 6 24 4 13

4 0 25 11 15

<< snip -- a lot of quadrilateral faces >>

So now we're ready to convert this to a povray file for

rendering. I've already supplied a conversion utility called

qhull.py, inside of which is the convert method. You run it like

this:

>>> from qhull import convert

>>> convert('input.txt','output.pov')

I've preset some textures to make your rendering look more like a

museum piece. Here's what I get:

http://www.inetarena.com/~pdx4d/ocn/graphics/trapez.gif

(plus I added the caption in PaintShop).

If you have extra time at the end of the lab, feel free to

play around with these settings by popping open qhull.py

and tweaking the source code. You could try using a wood

surface.

For those of you less familiar with Povray (I know the art

teacher has been using it), I've put some information in a

handout.

The trapezoidal icositetrahedron has its own dual of course:

the small rhombicuboctahedron. You'll find these listed on

pp 80-81 (heh) of Robert Williams' 'The Geometrical Foundation

of Natural Structure', one of our source books for this class.

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/