The polyhedron can be chosen with the -p option. The choices are
A frequency value is given to say how the pattern will be repeated. In Class I and II patterns the frequency value refers to the number of divisions of an edge, by balls or struts. For Class III patterns, and any pattern specified as a pair of integers, the program will use the frequency value as the number of times to repeat the pattern along an edge.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| 0,6 F6 Class I |
1,5 1x 1,5 Class III |
2,4 2x 1,2 Class III |
3,3 F6 Class II |
4,2 2x 2,1 Class III |
5,1 1x 5,1 Class III |
6,0 F6 Class I |
All the patterns may be specified by a pair of integers (thanks to Anton Sherwood for this suggestion, see Clinton's Equal Angle Conjecture for further details). If the integers are a and b, a triangular grid is laid out on the polyhedron face, having (a² + ab + b²)/Highest Common Factor(a, b) divisions. Taking the face edges in order it is posible, starting at a face vertex, to step a units in the direction of one edge, then b units in the direction of the following edge and, if lying on the face, this point will be a geodesic vertex. The process can be repeated three times from this geodesic vertex, finding the original face vertex and up to two new geodesic vertices. The process is continued until all the geodesic vertices covering the face have been found.
In terms of the general pattern the Class I pattern is equivalent to 0,1 with the frequency value corresponding to divisions along an edge. The Class II pattern is equivalent to 1,1 with frequency value corresponding to half the divisions along an edge. Any pattern a,b with a, b > 0 and a ≠ b is a Class III pattern. Class III patterns are chiral, with a,b and b,a being mirror images of each other.
Another way of understanding the pattern formed by the integer pair is that if the frequency is f then it is possible to move between face vertices by moving fa vertices along one line, then turning and moving fb along another line.
For some patterns there will be geodesic vertices lying on the polyhedron edges between the face vertices. There will be f(a² + ab + b²)/Highest Common Factor(a, b) steps between these geodesic vertices along each polyhedron edge.
When the face is divided into a triangular grid the grid divisions along the edge may be equiangular at the centre (default), or have equal lengths (-l). The polyhedron can be projected onto a sphere (default) or remain flat-faced (-f).
Here are some example images of 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 |
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 pattern 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 |
pg_geo.py -d 1,3 4 4 times 1,3 Class III |
usage: pg_geo.py [options] [freq]
Create coordinates for a higher frequency, plane-faced or spherical,
icosahedron, octahedron or tetrahedron. For Class I and II patterns
freq (default 2) is the number of divisions along an edge, for Class III
patterns (and those specified by two numbers) freq is the number of times
the pattern is repeated along an edge. By default the edges are divided
into sections with an equal angle at the origin, a Class I pattern, and
the points are then projected onto a sphere.
options
-h this help message
-p poly type of poly: i - icosahedron (default), o - octahedron,
t - tetrahedron, T - triangle.
-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),
or two numbers separated by a comma to determine the pattern
(Class III generally, but 1,0 is Class I, 1,1 is Class II, etc).
-o file write output to file, if this option is not used
the program writes to standard output.