Difference between revisions of "Template:Rotor"

From LifeWiki
Jump to navigation Jump to search
(add divider)
(Use Template:PatternPopulationAndBoundingBox; group "generic" parameters at top of infobox)
Line 15: Line 15:
 
<tr>
 
<tr>
 
<th valign="top"> Pattern type </th>
 
<th valign="top"> Pattern type </th>
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Rotor]] </td></tr>
+
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Rotor]] </td></tr><!--
<tr>
+
 
<th> Number of [[cell]]s </th>
+
Display population and bounding box. Passing catextra= ensures we also get rotor-specific categories, e.g. "Rotors with ... cells".
<td> {{#if: {{{c|}}} | {{#iferror: {{#expr: floor({{{c}}})}} | {{{c}}} | {{#ifexpr: {{{c|}}} >= 1000 | [[:Category:Patterns with 1000 or more cells|{{{c}}}]] | [[:Category:Patterns with {{{c}}} cells|{{{c}}}]] }} }} | Unknown }} </td></tr>
+
 
<tr>
+
-->{{PatternPopulationAndBoundingBox
<th> [[Bounding box]] </th>
+
|c        = {{{c|}}}
<td> {{#if: {{{bx|}}} | {{{bx}}}&times;{{{by}}} | Unknown }} </td></tr>
+
|bx      = {{{bx|}}}
 +
|by      = {{{by|}}}
 +
|catextra = Rotors
 +
}}<!--
 +
 
 +
Display an infobox divider
 +
 
 +
-->{{InfoboxDivider}}
 
<tr>
 
<tr>
 
<th> [[Period#Oscillators|Period]] </th>
 
<th> [[Period#Oscillators|Period]] </th>
Line 90: Line 97:
 
[[Category:Patterns]]
 
[[Category:Patterns]]
 
[[Category:Rotors]]{{#if: {{{type|}}} | [[Category:{{{type|}}}s]] }}
 
[[Category:Rotors]]{{#if: {{{type|}}} | [[Category:{{{type|}}}s]] }}
{{#if: {{{c|}}} | {{#iferror: {{#expr: floor({{{c}}})}} | | {{#ifexpr: {{{c|}}} >= 1000 | [[Category:Patterns with 1000 or more cells]] [[Category:Rotors with 1000 or more cells]] | [[Category:Patterns with {{{c}}} cells]] [[Category:Rotors with {{{c}}} cells]] }} }} }}{{#if: {{{p|}}} | [[Category:Rotors with period {{{p}}}]] }}{{#if: {{{m|}}} | [[Category:Rotors with mod {{{m|}}}]] }}{{#if: {{{h|}}} | {{#iferror: {{#expr: floor({{{h}}})}} | | [[Category:Rotors with heat {{#expr: floor({{{h}}})}}]] }} }}{{#if: {{{v|}}} | [[Category:Rotors with volatility {{{v}}}]] }}
+
{{#if: {{{p|}}} | [[Category:Rotors with period {{{p}}}]] }}{{#if: {{{m|}}} | [[Category:Rotors with mod {{{m|}}}]] }}{{#if: {{{h|}}} | {{#iferror: {{#expr: floor({{{h}}})}} | | [[Category:Rotors with heat {{#expr: floor({{{h}}})}}]] }} }}{{#if: {{{v|}}} | [[Category:Rotors with volatility {{{v}}}]] }}
 
</includeonly>
 
</includeonly>

Revision as of 20:50, 18 February 2018

Rotor Name
Pattern type Rotor
Period Unknown
Mod Unknown
Heat Unknown
Volatility Unknown
Discovered by Unknown
Year of discovery Unknown

This is an infobox template for rotors. An example can be seen to the right. For general information about how to use pattern templates, see LifeWiki:Style guide/Pattern layout. To see a live example of this template in action, see Diagonal on-off.

Special parameters

The following parameters are optional and should only be specified if their values are known.

  • p: the period of the rotor (e.g. p=4).
  • m: the mod of the rotor (e.g. m=2).
  • h: the heat of the rotor (e.g. h=4). Decimal values are allowed, though it is most common not to include more than 1 decimal place.
  • v: the volatility of the rotor (e.g. v=0.50). Include 2 digits after the decimal place.

Pattern templates