MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

a polyhedral function

  • To: mathgroup at
  • Subject: [mg3029] a polyhedral function
  • From: rustybel at (Russell Towle)
  • Date: Wed, 24 Jan 1996 03:34:09 -0500

Here is a function I have developed; it is based closely upon the Truncate
function in the Polyhedra package.  It fails when applied to certain types
of polyhedra, such as torus knots.  Any comments or suggestions would be

The HollowPolygon function below operates upon any polyhedron, and replaces
each face of the polyhedron with a hollow polygon.  The original polygons
need not be regular, nor of all the same number of sides.  For instance,
the uniform polyhedron #28 in Roman Maeder's Uniform Polyhedra package,
with its mixture of squares, hexagons, and decagons, is quite pretty when
transformed by HollowPolygon.  The function accepts three arguments:  poly,
a polyhedron; k, by default 1, a parameter which will tilt the planes of
the strips forming the hollow polygon either in (k<1) or out (k>1); and w,
a parameter which determines the width of the strips forming the hollow

HollowFace[face_List, k_, w_] :=
        Block[{apex, i, f=Length[face]},
                apex = N [k (Plus @@ face)/f];
                Table[ Polygon[ {((apex-face[[i]])/rad)+face[[i]], face[[i]],
                face[[ Mod[i, f] + 1 ]],
                ((apex-face[[Mod[i, f] + 1]])/rad)+face[[Mod[i, f]+1]] }],
                {i, f} ]

HollowPolygon[poly_, k_:1, w_:2] :=
        Flatten[ poly /. Polygon[x_] :> HollowFace[x, k, w] ] /;



Russell Towle
Giant Gap Press,
Dutch Flat, California
Voice:  (916) 389-2872
e-mail:  rustybel at


  • Prev by Date: Sqrt Tip
  • Next by Date: a polyhedral function
  • Previous by thread: Re: Sqrt Tip
  • Next by thread: a polyhedral function