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
{{Template:XXX polyhedra db}} — A database of information about different polyhedra.
Usage
{{Uniform polyhedra db
|Template used to display the information #REQUIRED
|Short form name #REQUIRED
}}
=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.
- 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)
So gtCO becomes great truncated CubeOctahedron.
=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|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
Example
class="wikitable"
! Code ! Result | |
style="vertical-align:top;"
|
| {{Reg polyhedra db|Polyhedra smallbox2|T}} |
How it works
Each polyhedron is included with code like
{{Reg polyhedra db|Polyhedra smallbox2|T}}
Where Reg polyhedra db
is a template containg the regular polyhedron data. Polyhedra smallbox2
is a template for displaying the data and T
is the name of the polyhedra, in this case Tetrahedron.
Template:Reg polyhedra db is like
{{{{{1}}}|{{{2}}}|
|T-name=Tetrahedron|T-image=tetrahedron.jpg|T-Wythoff=3|3 2|
|T-W=1|T-U=01|T-K=06|T-C=15|T-V=4|T-E=6|T-F=4|T-Fdetail=4{3}|T-chi=2|
|T-vfig=3.3.3|T-vfigimage=tetrahedron_vertfig.png|T-group=Td|
|O-name=Octahedron|O-image=octahedron.jpg|O-Wythoff=4|3 2|
...
}}
The first two parameters to this template just pass their arguments through, so this resolves to
{{Polyhedra smallbox2|T|T-name=Tetrahedron|....}}
and means that the Polyhedra smallbox2 template is called. Each variable in this template is of the form X-name
where X is a short name for the polyhedron.
Template:Polyhedra smallbox2 is like
V {{{{{{1}}}-V}}},E {{{{{{1}}}-E}}},F {{{{{{1}}}-F}}}={{{{{{1}}}-Fdetail}}}
?={{{{{{1}}}-chi}}}, group={{{{{{1}}}-group}}}
{{{{{{1}}}-Wythoff}}} - {{{{{{1}}}-vfig}}}
W{{{{{{1}}}-W}}}, U{{{{{{1}}}-U}}}, K{{{{{{1}}}-K}}}, C{{{{{{1}}}-C}}}
{{{{{{1}}}-altname|}}}
Occurences of T
so after substituting the variable it becomes
V {{{T-V}}},E {{{T-E}}},F {{{T-F}}}={{{T-Fdetail}}}
?={{{T-chi}}}, group={{{T-group}}}
{{{{T-Wythoff}}} - {{{T-vfig}}}
W{{{{T-W}}}, U{{{T-U}}}, K{{{T-K}}}, C{{{T-C}}}
{{{T-altname|}}}
Finally {{{T-image}}}
and {{{T-name}}}
just select the other parameters from the Reg polyhedra db
so this now just like an infobox template.