Difference between revisions of "Template:Oscillator"

From LifeWiki
Jump to navigation Jump to search
m
(Pass "periodic" to PatternPopulationAndBoundingBox)
(34 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{zip|}}}{{{mc|}}}{{{life105|}}}{{{life106|}}}{{{plaintext|}}}{{{rle|}}}{{{nofile|}}} | | {{requestpatternfile}} }}</includeonly>
<!--
<table class="infobox">
 
<tr><td colspan="2" class="infobox_head"> {{{name|Oscillator Name}}} </td></tr>
Begin infobox
<tr>
 
<td colspan="2" class="infobox_img"><table class="img_border" cellpadding="0"><tr><td>{{#if: {{{zip|}}}{{{mc|}}}{{{life105|}}}{{{life106|}}}{{{plaintext|}}}{{{rle|}}}{{{nofile|}}} | {{#ifexist:RLE:{{{pname}}}|{{LV:Viewer|{{RLE:{{{pname}}}}}
-->{{InfoboxStart
{{LifeViewer config/oscillator}}
|typename      = Oscillator
{{#tag:nowiki|{{{viewerconfig|}}}}}|[[Image:{{{pname|}}}.png|{{{name}}} image]]}}|[[Image:{{{pname|}}}.png|{{{name}}} image]]}}|[[Image:UnknownPattern.png|{{{name}}} image]]}}</td></tr></table></td></tr>{{#if: {{{animated|}}} | <tr><td colspan="2" class="infobox_animlink"> [[Media:{{{pname|name}}}.gif|View animated image]]}}<tr><td colspan="2" class="infobox_animlink"> [[Media:{{{pname|name}}}.png|View static image]] </td></tr>
|defaultconfig = oscillator
|viewerconfig  = {{{viewerconfig|}}}
|name          = {{{name|}}}
|zip          = {{{zip|}}}
|mc            = {{{mc|}}}
|life105      = {{{life105|}}}
|life106      = {{{life106|}}}
|plaintext    = {{{plaintext|}}}
|rle          = {{{rle|}}}
|nofile        = {{{nofile|}}}
|pname         = {{{pname|}}}
|animated     = {{{animated|}}}
}}<!--
 
Display pattern type and related information
 
-->
<tr>
<tr>
<th valign="top"> Pattern type </th>
<th valign="top"> Pattern type </th>
Line 21: Line 37:
<th> Family </th>
<th> Family </th>
<td> [[:Category:{{{family}}} variants|{{{family}}}]] </td></tr>
<td> [[:Category:{{{family}}} variants|{{{family}}}]] </td></tr>
}}
}}<!--
<tr>
 
<th> Number of [[cell]]s </th>
Display population and bounding box. Passing catextra= ensures we also get oscillator-specific categories, e.g. "Oscillators 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|}}}
|fc      = {{{fc|}}}
|catextra = Oscillators
|periodic = true
}}<!--
 
Display an infobox divider
 
-->{{InfoboxDivider}}
<tr>
<tr>
<th> [[Period#Oscillators|Period]] </th>
<th> [[Period#Oscillators|Period]] </th>
Line 40: Line 65:
<th> [[Volatility]] </th>
<th> [[Volatility]] </th>
<td> {{#if: {{{v|}}} |[[:Category:Oscillators with volatility {{{v}}}|{{{v}}}]] | Unknown }} </td></tr>
<td> {{#if: {{{v|}}} |[[:Category:Oscillators with volatility {{{v}}}|{{{v}}}]] | Unknown }} </td></tr>
<tr>
<th> [[Strict volatility]] </th>
<td> {{#if: {{{sv|}}} |[[:Category:Oscillators with strict volatility {{{sv}}}|{{{sv}}}]] | {{#if: {{{v|}}} | {{#if: {{isPrime|{{{p|}}}}} | [[:Category:Oscillators with strict volatility {{{v}}}|{{{v}}}]] | Unknown }} | Unknown }} | Unknown }} </td></tr>
{{#if: {{{rotor|}}} |  
{{#if: {{{rotor|}}} |  
<tr>
<tr>
<th> [[Rotor]] type </th>
<th> [[Rotor]] type </th>
<td> [[:Category:Oscillators with rotor {{{rotor}}}|{{{rotor}}}]] </td></tr>
<td> [[:Category:Oscillators with rotor {{{rotor}}}|{{{rotor}}}]] </td></tr>
}}
}}<!--
<tr>
 
<th> Discovered by </th>
Display an infobox divider
<td> {{#if: {{{discoverer|}}} | [[{{{discoverer|}}}]] | Unknown }} </td></tr>
 
<tr>
-->{{InfoboxDivider}}<!--
<th> Year of discovery </th>
 
<td> {{#if: {{{discoveryear|}}} | [[:Category:Patterns_found_in_{{{discoveryear|}}}|{{{discoveryear|}}}]] | Unknown }} </td></tr>{{PatternDownload|synthesis={{{synthesis|}}}|synthesisRLE={{{synthesisRLE|}}}|life105={{{life105|}}}|life106={{{life106|}}}|plaintext={{{plaintext|}}}|zip={{{zip|}}}|rle={{{rle|}}}|mc={{{mc|}}}|pname={{{pname|}}}|rulespecial={{{rulespecial|}}}|rulemax={{{rulemax|}}}|rulemin={{{rulemin|}}} }}{{PatternIdentifiers|apgcode={{{apgcode|}}}|niemiecid={{{niemiecid|}}}|pentadecathlonid={{{pentadecathlonid|}}} }}</table>
Display discoverers and year of discovery
<noinclude>
 
This is an infobox template for '''[[oscillator]]s'''. 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 [[Gray counter]].
-->{{PatternDiscovery
|discoverer  = {{{discoverer|}}}
|discoverer2  = {{{discoverer2|}}}
|discoverer3  = {{{discoverer3|}}}
|discoverer4  = {{{discoverer4|}}}
|discoverer5  = {{{discoverer5|}}}
|discoveryear = {{{discoveryear|}}}
}}<!--
 
Display "Rules", "Glider synthesis", "Pattern files" sections
 
-->{{PatternDownload
|synthesis   = {{{synthesis|}}}
|synthesisRLE = {{{synthesisRLE|}}}
|apgcode      = {{{apgcode|}}}
|life105     = {{{life105|}}}
|life106     = {{{life106|}}}
|plaintext   = {{{plaintext|}}}
|zip         = {{{zip|}}}
|mc          = {{{mc|}}}
|rle          = {{{rle|}}}
|pname       = {{{pname|}}}
|rulespecial = {{{rulespecial|}}}
|rulemax     = {{{rulemax|}}}
|rulemin     = {{{rulemin|}}}
|isorulemax  = {{{isorulemax|}}}
|isorulemin  = {{{isorulemin|}}}
}}<!--
 
Display "Identifiers" section
 
-->{{PatternIdentifiers
|apgcode         = {{{apgcode|}}}
|niemiecid       = {{{niemiecid|}}}
|pentadecathlonid = {{{pentadecathlonid|}}}  
}}<!--
 
End infobox
 
--></table><!--


==Special parameters==
Transcluded documentation
The following parameters are optional and should only be specified if their values are known.
*'''p''': the period of the oscillator (e.g. p=4).
*'''m''': the mod of the oscillator (e.g. m=2).
*'''h''': the heat of the oscillator (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 oscillator (e.g. v=0.50). Include 2 digits after the decimal place.
*'''f1''': one category this oscillator falls under (e.g. f1=Muttering moat).
*'''f2''': any other categories (e.g. f2=Billiard table).


--><noinclude>{{Oscillator/Doc}}
{{PatternTemplates}}
{{PatternTemplates}}
</noinclude>
</noinclude><!--
<includeonly>
 
Categories
 
--><includeonly>
{{#ifeq:{{NAMESPACE}}|User||
[[Category:Patterns]]
[[Category:Patterns]]
[[Category:Oscillators]]{{#if: {{{type|}}} | [[Category:{{pluralize|{{{type|}}}}}]] {{#if: {{{c|}}} | [[Category:{{pluralize|{{{type|}}}}} with {{{c}}} cells]] }} }}
{{#ifeq: {{{type|}}} | constellation | [[Category:Constellations]] {{#if: {{{c|}}} | [[Category:Constellations with {{{c}}} cells]] }} | [[Category:Oscillators]] {{#if: {{{c|}}} | {{#ifexpr: {{{c|}}} < 1000 | [[Category:Oscillators with {{{c}}} cells]][[Category:Periodic objects with minimum population {{{c}}}]] }} }} }}
{{#if: {{{c|}}} | {{#iferror: {{#expr: floor({{{c}}})}} | | {{#ifexpr: {{{c|}}} >= 1000 | [[Category:Patterns with 1000 or more cells]] [[Category:Oscillators with 1000 or more cells]] | [[Category:Patterns with {{{c}}} cells]] [[Category:Oscillators with {{{c}}} cells]] }} }} }}{{#if: {{{family|}}} | [[Category:{{{family|}}} variants]] }}{{#if: {{{f1|}}} | [[Category:{{pluralize|{{{f1|}}}}}]] }}{{#if: {{{f2|}}} | [[Category:{{pluralize|{{{f2|}}}}}]] }}{{#if: {{{p|}}} | [[Category:Oscillators with period {{{p}}}]] | [[Category:Oscillators with unknown period]] }}{{#if: {{{m|}}} | [[Category:Oscillators with mod {{{m|}}}]] | [[Category:Oscillators with unknown mod]] }}{{#if: {{{h|}}} | {{#iferror: {{#expr: floor({{{h}}})}} | | [[Category:Oscillators with heat {{#expr: floor({{{h}}})}}]] }} | [[Category:Oscillators with unknown heat]] }}{{#if: {{{v|}}} | [[Category:Oscillators with volatility {{{v}}}]] | [[Category:Oscillators with unknown volatility]] }}{{#if: {{{rotor|}}} | [[Category:Oscillators with rotor {{{rotor|}}}]] }}{{#if: {{{discoverer|}}} | [[Category:Patterns found by {{{discoverer|}}}]] }}{{#if: {{{discoveryear|}}} | [[Category:Patterns found in {{{discoveryear|}}}]] }}{{#ifexist:RLE:{{{pname}}}|{{#if:{{{viewerconfig|}}}||[[Category:Patterns with RLE snippets but no LifeViewer configuration]]}}}}{{#if: {{{apgcode|}}} | | {{#ifeq: {{{type|}}} | constellation | | [[Category:Oscillators with no apgcode infobox parameter]] }} }}
{{#if: {{{type|}}} | [[Category:{{pluralize|{{{type|}}}}}]] {{#if: {{{c|}}} | [[Category:{{pluralize|{{{type|}}}}} with {{{c}}} cells]] }} }}{{#if: {{{family|}}} | [[Category:{{{family|}}} variants]] }}{{#if: {{{f1|}}} | [[Category:{{pluralize|{{{f1|}}}}}]] }}{{#if: {{{f2|}}} | [[Category:{{pluralize|{{{f2|}}}}}]] }}{{#if: {{{p|}}} | [[Category:Oscillators with period {{{p}}}]] | [[Category:Oscillators with unknown period]] }}{{#if: {{{m|}}} | [[Category:Oscillators with mod {{{m|}}}]] | [[Category:Oscillators with unknown mod]] }}{{#if: {{{h|}}} | {{#iferror: {{#expr: floor({{{h}}})}} | | [[Category:Oscillators with heat {{#expr: floor({{{h}}})}}]] }} | [[Category:Oscillators with unknown heat]] }}{{#if: {{{v|}}} | {{#iferror: {{#expr: floor({{{v}}})}} | | [[Category:Oscillators with volatility {{{v}}}]] }} | [[Category:Oscillators with unknown volatility]] }}{{#if: {{{sv|}}} | {{#iferror: {{#expr: floor({{{sv}}})}} | | [[Category:Oscillators with strict volatility {{{sv}}}]] }} | {{#if: {{{v|}}} | {{#if: {{isPrime|{{{p|}}}}} | [[Category:Oscillators with strict volatility {{{v|}}}]] | [[Category:Oscillators with unknown strict volatility]] }} | [[Category:Oscillators with unknown strict volatility]] }} | [[Category:Oscillators with unknown strict volatility]] }}{{#if: {{{rotor|}}} | [[Category:Oscillators with rotor {{{rotor|}}}]] }}{{#ifexist: RLE:{{{pname}}} | {{#if:{{{viewerconfig|}}} | | [[Category:Patterns with RLE snippets but no LifeViewer configuration]] }} }}{{#if: {{{apgcode|}}} | | {{#ifeq: {{{type|}}} | constellation | | [[Category:Oscillators with no apgcode infobox parameter]] }} }}{{#if: {{{pentadecathlonid|}}} | | {{#ifeq: {{{type|}}} | constellation | | [[Category:Oscillators with no Pentadecathlon ID]] }} }}
</includeonly>
}}</includeonly>

Revision as of 17:15, 27 April 2019

Oscillator Name
image
Pattern type Oscillator
Period Unknown
Mod Unknown
Heat Unknown
Volatility Unknown
Strict volatility Unknown
Discovered by Unknown
Year of discovery Unknown

This is an infobox template for oscillators. 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 Gray counter.

Special parameters

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

  • p: the period of the oscillator (e.g. p=4).
  • m: the mod of the oscillator (e.g. m=2).
  • h: the heat of the oscillator (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 oscillator (e.g. v=0.50). Include 2 digits after the decimal place.
  • sv: the strict volatility of the oscillator (e.g. sv=0.50). Include 2 digits after the decimal place, or as many digits as necessary to distinguish a non-zero number from zero.
  • f1: one category this oscillator falls under (e.g. f1=Muttering moat).
  • f2: any other categories (e.g. f2=Billiard table).


Pattern templates