Template:Oscillator: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
No edit summary
completed kinetic symmetry logic
 
(124 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{| class="infobox"
<!--
|-
 
| colspan="2" class="infobox_head" | {{{name|Oscillator Name}}}
Begin infobox
|-
 
| colspan="2" class="infobox_img" | <table class="img_border" cellpadding="0"><tr><td>[[Image:{{{pname|101}}}.png]]</td></tr></table>
-->{{InfoboxStart
{{#if: {{{animated|}}} | {{!}}-
|typename      = Oscillator
{{!}} colspan="2" class="infobox_animlink" {{!}} [[Media:{{{pname|name}}}.gif|View animated image]]
|defaultconfig = oscillator
}}
|viewerconfig  = {{{viewerconfig|}}}
{{#if: {{{rle|}}} | {{!}}-
|name          = {{{name|}}}
{{!}} colspan="2" class="infobox_link" {{!}} [http://www.conwaylife.com?p={{{pname|name}}} Manipulate via Java]
|zip          = {{{zip|}}}
}}
|mc            = {{{mc|}}}
|-
|life105      = {{{life105|}}}
! Pattern type
|life106      = {{{life106|}}}
| [[Oscillator]]
|plaintext    = {{{plaintext|}}}
|-
|rle          = {{{rle|}}}
! [[Period]]
|nofile        = {{{nofile|}}}
| {{#if: {{{p|}}} | [[:Category:Oscillators with period {{{p}}}|{{{p}}}]] | Unknown }}
|pname        = {{{pname|}}}
|-
|animated      = {{{animated|}}}
! Number of cells
|hideimg      = {{{hideimg|}}}
| {{#if: {{{c|}}} | [[:Category:Patterns with {{{c}}} cells|{{{c}}}]] | Unknown }}
}}<!--
|-
 
! Discovered by
Display pattern type and related information
| {{#if: {{{discoverer|}}} | [[:Category:Patterns_found_by_{{{discoverer|}}}|{{{discoverer|}}}]] | Unknown }}
 
|-
-->
! Year of discovery
<tr>
| {{#if: {{{discoveryear|}}} | [[:Category:Patterns_found_in_{{{discoveryear|}}}|{{{discoveryear|}}}]] | Unknown }}
<th valign="top"> Pattern type </th>
{{PatternDownload|pname={{{pname|name}}}|life105={{{life105|}}}|life106={{{life106|}}}|plaintext={{{plaintext|}}}|rle={{{rle|}}}}}
<td> {{#if: {{{type|}}} | {{#ifeq: {{{type|}}} | constellation | [[Constellation]] | [[{{{type|}}}]] }}<br /> }}[[Oscillator]] </td></tr>
<noinclude>
{{#if: {{{f1|}}} |
The oscillator template is an infobox template for [[oscillator]] [[pattern|patterns]]. An example can be seen to the right.
<tr>
</noinclude>
<th> Oscillator type </th>
<includeonly>
<td> [[:Category:{{pluralize|{{{f1}}}}}|{{{f1}}}]] </td></tr>
}}{{#if: {{{f2|}}} |
<tr>
<th>  </th>
<td> [[:Category:{{pluralize|{{{f2}}}}}|{{{f2}}}]] </td></tr>
}}{{#if: {{{family|}}} |  
<tr>
<th> Family </th>
<td> [[:Category:{{{family}}} variants|{{{family}}}]] </td></tr>
}}<!--
 
Display population and bounding box. Passing catextra= ensures we also get oscillator-specific categories, e.g. "Oscillators with ... cells".
 
-->{{PatternPopulationAndBoundingBox
|c        = {{{c|}}}
|bx      = {{{bx|}}}
|by      = {{{by|}}}
|fc      = {{{fc|}}}
|catextra = Oscillators
|periodic = {{#ifeq: {{{type|}}} | pseudo | | {{#ifeq: {{{type|}}} | constellation | | true }} }}
}}<!--
 
Display an infobox divider
 
-->{{InfoboxDivider}}
<tr>
<th> [[Period#Oscillators|Period]] </th>
<td> {{#if: {{{p|}}} | {{#if: {{NAMESPACE}} | {{{p}}} | [[:Category:Oscillators with period {{{p}}}|{{{p}}}]] }} | Unknown }} ([[mod]]: {{#if: {{{m|}}} | {{#if: {{NAMESPACE}} | {{{m}}} | [[:Category:Oscillators with mod {{{m}}}|{{{m}}}]] }} | Unknown }}) </td></tr>
<tr>
<th> [[Heat]] </th>
<td> {{#if: {{{h|}}} | {{#iferror: {{#expr: floor({{{h}}})}} | {{{h}}} | {{#if: {{NAMESPACE}} | {{{h}}} | [[:Category:Oscillators with heat {{CellsCategoryName|{{#expr: floor({{{h}}})}}}}|{{{h}}}]] }} }} | Unknown }} </td></tr>
<tr>
<th> [[Volatility]] </th>
<td> {{#if: {{{v|}}} | {{#if: {{NAMESPACE}} | {{{v}}} | [[:Category:Oscillators with volatility {{{v}}}|{{{v}}}]] }} | Unknown }} <nowiki> | </nowiki> {{#if: {{{sv|}}} | {{#if: {{NAMESPACE}} | {{{sv}}} | [[:Category:Oscillators with strict volatility {{{sv}}}|{{{sv}}}]] }} | {{#if: {{{v|}}} | {{#if: {{isPrime|{{{p|}}}}} | {{#if: {{NAMESPACE}} | {{{v}}} | [[:Category:Oscillators with strict volatility {{{v}}}|{{{v}}}]] }} | Unknown }} | Unknown }} | Unknown }} </td></tr>
<tr>
<th> [[Kinetic symmetry]] </th>
<td> {{#if: {{NAMESPACE}} | {{{symmetry|Unspecified}}} | {{#if: {{{symmetry|}}} | [[:Category:Oscillators with {{{symmetry}}} symmetry|{{{symmetry}}}]] | Unspecified }} | Unspecified }} </td></tr>
{{#if: {{{rotor|}}} |
<tr>
<th> [[Rotor]] type </th>
<td> {{#if: {{NAMESPACE}} | {{{rotor}}} | [[:Category:Oscillators with rotor {{{rotor}}}|{{{rotor}}}]] }} </td></tr>
}}<!--
 
Display an infobox divider
 
-->{{InfoboxDivider}}<!--
 
Display discoverers and year of discovery
 
-->{{PatternDiscovery
|discoverer  = {{{discoverer|}}}
|discoverer2  = {{{discoverer2|}}}
|discoverer3  = {{{discoverer3|}}}
|discoverer4  = {{{discoverer4|}}}
|discoverer5  = {{{discoverer5|}}}
|discoveryear = {{{discoveryear|}}}
}}<!--
 
Display "Rules", "Glider synthesis", "Pattern files" sections
 
-->{{PatternDownload
|synthesis    = {{{synthesis|}}}
|synthesis2  = {{{synthesis2|}}}
|synthesisRLE = {{{synthesisRLE|}}}
|apgcode      = {{{apgcode|}}}
|apgcode2    = {{{apgcode2|}}}
|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|}}}
|apgcode2        = {{{apgcode2|}}}
|niemiecid        = {{{niemiecid|}}}
|pentadecathlonid = {{{pentadecathlonid|}}}
}}<!--
 
End infobox
 
--></table><!--
 
Transcluded documentation
 
--><noinclude>{{Oscillator/Doc}}
{{PatternTemplates}}
</noinclude><!--
 
Categories
 
--><includeonly>
{{#if:{{NAMESPACE}}||
[[Category:Patterns]]
[[Category:Patterns]]
[[Category:Oscillators]]
{{#ifeq: {{{type|}}} | constellation | [[Category:Constellations]] {{#if: {{{c|}}} | [[Category:Constellations with {{{c}}} cells]] }} | [[Category:Oscillators]] }}
{{#if: {{{c|}}} | [[Category:Patterns with {{{c}}} cells]] }}{{#if: {{{p|}}} | [[Category:Oscillators with period {{{p}}}]] }}{{#if: {{{discoverer|}}} | [[Category:Patterns found by {{{discoverer|}}}]] }}{{#if: {{{discoveryear|}}} | [[Category:Patterns found in {{{discoveryear|}}}]] }}
{{#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}}}]]<!--
</includeonly>
-->{{#ifexpr:{{{p}}} > 10|{{#if:{{isPrime|{{{p}}}}}|[[Category:Prime-period oscillators|{{padleft:{{{p}}}|4}}]]}}}}<!--
-->| [[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 {{CellsCategoryName|{{#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: {{{symmetry|}}} | [[Category:Oscillators with {{{symmetry|}}} symmetry]] | [[Category:Oscillators with unknown symmetry]] }}{{#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>

Latest revision as of 18:59, 9 August 2024

Oscillator Name
image
Pattern type Oscillator
Period Unknown (mod: Unknown)
Heat Unknown
Volatility Unknown | Unknown
Kinetic symmetry Unspecified
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