[Edu-sig] OT: calculating dodeca icosa solid assembly angles

kirby urner kirby.urner at gmail.com
Sat Jan 20 05:39:12 CET 2007


> So ... passing the polyhedron itself as the first
> parameter, and referencing into it with the first
> letter (string), makes 'total' subject to rebinding.
> With successive additions of vectors 'p', 'c', 'i'
> and 'b', the vector named 'o' gets updated.

To illustrate further:

>>> newpd = Pentdodeca()
>>> newpd.vertices['o']
vector(0.809016994374947, 0.309016994374947, 0)
>>> def addvects(shape, thelist):
	total = shape.vertices[thelist[0]]
	for vertex in thelist[1:]:
		total += shape.vertices[vertex]
	return total

>>> altitude = addvects(newpd, ('o', 'p', 'c', 'i', 'b'))
>>> newpd.vertices['o']
vector(2.92705098312484, 0, 1.80901699437495)

I'd consider this a bug.

Also, we really need to go

altitude = (1/5.0)*altitude

if proceeding on the analogy of what we did for the
tetrahedron guy.

Then compute sideline as (1/2) of adjacent vertices,
subtract the degree angle twixt sideline and altitude
from 90 degrees to get the "bevel angle" (defined in
terms of the a lid of the casement and its dihedral
with a rib, where they meet mid edge).

Kirby


More information about the Edu-sig mailing list