Packinon Home > Python programs > pg_geo.py

pg_geo.py

pg_geo.py distributes points in multiple frequency polyhedral patterns, such as the vertices of geodesic spheres.

The polyhedron can be chosen with the -p option. The choices are

Frequency refers to the number of divisions of an edge, which is used to divide the triangular faces into a mesh of smaller triangles. The points calculated are the overlap points of this mesh. The divisions along the edge may be equiangular or equal lengths. The polyhedron can be projected onto a sphere.

The type of face division is chosen with the -d option

Here are some example images (all Class I divisions).

pg_geo.py -p o 8
8 frequency spherical octahedron
pg_geo.py 10
10 frequency spherical icosahedron
pg_geo.py -l 10
10 frequency icosahedron projected onto a sphere
pg_geo.py -l -f 10
10 frequency icosahedron
In the 10 frequency icosahedral distributions the ball size shown is the maximum it can be without any balls overlapping (i.e the closest balls are in contact).

You can see how applying the frequency division to the spherical icosahedron produces a better distribution than applying it to the flat-faced icosahedron and then projecting the points onto a sphere.

Here are larger examples of spherical icosahedra, showing the different division types. They have the same orientation relative to the base icosahedron.

pg_geo.py -d 1 14
14 frequency Class I
pg_geo.py -d 2 16
16 frequency Class II

Program Help

usage: pg_geo.py [options] [freq]
         
Create coordinates for a higher frequency, plane-faced or spherical,
icosahedron, octahedron or tetrahedron. freq is the number of
divisions along an edge (default 4). By default the edges are divided
into sections with an equal angle at the origin, and the points are
then projected onto a sphere with a Class I division.

options
   -h       this help message
   -p poly  type of poly: i - icosahedron (default), o - octahedron,
            t - tetrahedron.
   -f       keep flat-faced polyhedron rather than projecting the points
            onto a sphere.
   -l       divide the edges by equal lengths rather than equal angles       
   -d type  type of face division,  1 (Class I, default) or 2 (Class II).
   -o file  write output to file, if this option is not used
            the program writes to standard output.





SourceForge.net Logo Adrian Rossiter - adrian_r@teleline.es