Template:UnitCell: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
add divider
No edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<!--  
<!--


Display "request pattern file" box if no pattern files exist and "nofile" was not passed to suppress this
Begin infobox


--><includeonly>{{#if: {{{zip|}}}{{{mc|}}}{{{life105|}}}{{{life106|}}}{{{plaintext|}}}{{{rle|}}}{{{nofile|}}} | | {{requestpatternfile}} }}</includeonly><!--
-->{{InfoboxStart
|typename      = Unit Cell
|defaultconfig = unitcell
|viewerconfig  = {{{viewerconfig|}}}
|name          = {{{name|}}}
|zip          = {{{zip|}}}
|mc            = {{{mc|}}}
|life105      = {{{life105|}}}
|life106      = {{{life106|}}}
|plaintext    = {{{plaintext|}}}
|rle          = {{{rle|}}}
|nofile        = {{{nofile|}}}
|pname        = {{{pname|}}}
|animated      = {{{animated|}}}
|hideimg      = {{{hideimg|}}}
}}<!--


Begin infobox
Display pattern type


--><table class="infobox">
--><tr>
<tr><td colspan="2" class="infobox_head"> {{{name|Pattern Name}}} </td></tr>
<tr>
<td colspan="2" class="infobox_img"><table class="img_border" cellpadding="0"><tr><td>{{#if: {{{zip|}}}{{{mc|}}}{{{life105|}}}{{{life106|}}}{{{plaintext|}}}{{{rle|}}}{{{nofile|}}} | [[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]] </td></tr> }}
<!-- {{#if: {{{rle|}}} | <tr><td colspan="2" class="infobox_link"> [http://www.conwaylife.com?p={{{pname|name}}} Manipulate via Java] </td></tr> }} -->
<tr>
<th> Pattern type </th>
<th> Pattern type </th>
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Unit cell]] </td></tr>
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Unit cell]] </td></tr><!--
<tr>
 
<th> Number of [[cell]]s </th>
Display population and bounding box.
<td> {{#if: {{{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|}}}
}}<!--
 
Display an infobox divider
 
-->{{InfoboxDivider}}
<tr>
<tr>
<th> Cell size </th>
<th> Cell size </th>
<td> {{#if: {{{sx|}}} | {{{sx}}}&times;{{{sy}}} | Unknown }} </td></tr>
<td> {{#if: {{{sx|}}} | {{times|{{{sx}}}|{{{sy}}}}} | Unknown }} </td></tr>
<tr>
<tr>
<th> [[Period#Oscillators|Period]] </th>
<th> [[Period#Oscillators|Period]] </th>
<td> {{#if: {{{p|}}} | [[:Category:Unit cells with period {{{p}}}|{{{p}}}]] | Unknown }} </td></tr><!--
<td> {{#if: {{{p|}}} | {{{p}}} | Unknown }} </td></tr><!--


Display an infobox divider
Display an infobox divider
Line 58: Line 74:
|rulemax      = {{{rulemax|}}}
|rulemax      = {{{rulemax|}}}
|rulemin      = {{{rulemin|}}}  
|rulemin      = {{{rulemin|}}}  
|isorulemax  = {{{isorulemax|}}}
|isorulemin  = {{{isorulemin|}}}
}}<!--
}}<!--


Line 81: Line 99:


--><includeonly>
--><includeonly>
{{#ifeq:{{NAMESPACE}}|User||
[[Category:Patterns]]
[[Category:Patterns]]
[[Category:Unit cells]]
[[Category:Unit cells]]
{{#if: {{{type|}}} | [[Category:{{{type|}}}s]] }}
}}
{{#if: {{{c|}}} | {{#iferror: {{#expr: floor({{{c}}})}} | | {{#ifexpr: {{{c|}}} >= 1000 | [[Category:Patterns with 1000 or more cells]] [[Category:Unit cells with 1000 or more cells]] | [[Category:Patterns with {{{c}}} cells]] [[Category:Unit cells with {{{c}}} cells]] }} }} }}{{#if: {{{p|}}} | [[Category:Unit cells with period {{{p}}}]] }}{{#if: {{{sx|}}}{{{sy|}}} | [[Category:Unit cells with cell size {{{sx}}}&times;{{{sy}}}]] }}
</includeonly>
</includeonly>

Latest revision as of 19:15, 28 April 2023

Unit Cell Name
image
Pattern type Unit cell
Cell size Unknown
Period Unknown
Discovered by Unknown
Year of discovery Unknown

This is an infobox template for unit cells. An example can be seen to the right. For general information about how to use pattern templates, see LifeWiki:Pattern pages. To see a live example of this template in action, see OTCA metapixel.

Special parameters

The following parameter should be specified:

  • p: the period of the unit cell.
  • sx, sy: the size of the unit cell (not its bounding box).


Pattern templates