User:Tomruen/polyhedron database documentation

= Polyhedron Database Documentation =

History

 * Created : Salix alba (talk) 11:53, 4 February 2006 (UTC)
 * Copied documentation here (from Template talk:Polyhedra DB) and updated/cleaned up a bit: Tom Ruen 11:42, 30 December 2006 (UTC)

Purpose
&#123;&#123;Template:XXX polyhedra db&#125;&#125;&#32;&mdash; A database of information about different polyhedra.

Display templates
The first argument to the template tag should be the name of a second template used to display information about an individual polyhedron. Possible arguments are
 * Template talk:Polyhedra smallbox2
 * Displays the polyhedron in a small box, intended to be used inside a table

Short names of Polyhedron
The nameing system follows the names used for the polyhedron but they have been shortend. So gtCO becomes great truncated CubeOctahedron.
 * T - tetrahedron or Tetra
 * O - octahedron or Octa
 * C - Cube
 * D - Dodecahedron or Dodeca
 * I - Icosahedron or Icosi
 * r - rhombi
 * s - stelated
 * g - great
 * t - truncated
 * l - small (lesser) used to avoid naming conflict
 * d - ditrigonal
 * h - hemi
 * u - uniform
 * n - snub (n is used to avoid name conflict)

Properties defined
For each polyhedron the following properties are defined.

Note: Each database template file can have slightly different data-fields, depending on what makes sense:

Here the initial T is replaced by the name of the each polyhedron
 * T-name=Tetrahedron - the name used in wikipedia for the polyhedron
 * stH-altname1=Quasitruncated hexahedron - alternate name for the polyhedron (optional)
 * stH-altname2=stellatruncated cube - second alternate name (optional)
 * T-image=tetrahedron.jpg - image of the polyhedron
 * T-Wythoff=3&#124;3 2 - Wythoff symbol
 * T-W=1 - number used in Polyhedron Models, by Magnus Wenninger.
 * T-U=01 - Uniform indexing: U01-U80 (Tetrahedron first, Prisms at 76+)
 * T-K=06 - Kaleido indexing: K01-K80  (prisms 1-5, Tetrahedron 6+)
 * T-C=15 - Number used in Coexeter et al -
 * T-V=4 - Number of vertices
 * T-E=6 - Number of edges
 * T-F=4 - Number of faces
 * T-Fdetail=4{3} - Number{type} of faces
 * T-chi=2 - Euler charteristic
 * T-vfig=3.3.3 - Vertex figure
 * T-vfigimage=tetrahedron_vertfig.png - image of vertex figure
 * T-group=Td - Symmetry group
 * T-B=Tet - Bowers name

How it works
Each polyhedron is included with code like Where  is a template containg the regular polyhedron data. is a template for displaying the data and  is the name of the polyhedra, in this case Tetrahedron.

Template:Reg polyhedra db is like

The first two parameters to this template just pass their arguments through, so this resolves to

and means that the Polyhedra smallbox2 template is called. Each variable in this template is of the form  where X is a short name for the polyhedron.

Template:Polyhedra smallbox2 is like   V ,E ,F = ?=, group=  - W, U, K, C Occurences of are replaced by the first parameter. In this case  so after substituting the variable it becomes   V ,E ,F = ?=, group= {{{{T-Wythoff}}} - W{{{{T-W}}}, U, K, C Finally  and   just select the other parameters from the   so this now just like an infobox template.