Difference between revisions of "Next-to Condition"

From AgentCubes
Jump to navigation Jump to search
imported>Mike
imported>Repenning
Line 1: Line 1:
[[image:Next to condition.png|150px]]
+
[[Image:Next to condition.png|150px|Next to condition.png]]  
  
[[image:Next to expanded.png|150px]]
+
[[Image:Next to expanded.png|150px|Next to expanded.png]]  
  
<table cellpadding="10" cellspacing="0" border="0" width="100%">
+
{| cellpadding="10" cellspacing="0" border="0" width="100%"
<tr>
+
|-
<td align="left" valign="top" width="80"><b>Definition:</b></td>
+
| align="left" valign="top" width="80" | '''Definition:'''
<td align="left" valign="top" width="100%">The <strong>Next-to</strong> condition checks to see how many of the 8 adjacent neighbors in the same layer have a certain [[Shape parameter|shape]]. If the agent is next to the right number of the specified shapes, the condition is true. Otherwise, the condition is false.</td>
+
| align="left" valign="top" width="100%" | True if there is a certain number of agents adjacent to me. Only check the 8 immediatly adjacent agents around me.&nbsp;
</tr>
+
|-
<tr>
+
| align="left" valign="top" width="80" | '''Parameters:'''
<td align="left" valign="top" width="80"><b>Parameters:</b></td>
+
| align="left" valign="top" width="100%" | [[Comparator parameter|comparator]]&nbsp;mathematical operator <br>[[VAT Formula parameter|number]]&nbsp;how many <br> [[Shape parameter|shape]]&nbsp;what shape
<td align="left" valign="top" width="100%">[[Comparator parameter|comparator]], [[Formula parameter|formula]], [[Shape parameter|shape]] </td>
+
|-
</tr>
+
| align="left" valign="top" width="80" | '''Example:'''
 
+
| align="left" valign="top" width="100%" | The Particle agent in the Accretion 3D project checks if it is next to at least one stationery Particle in the same layer or in the layers above (+1) or below (-1). If so, it changes itself to be a stationery Particle, increments a count and maps its color to a shade, based on the current count of stationery particles. [[Image:Next to condition example.png|500px|Next to condition example.png]]
<tr>
+
|}
<td align="left" valign="top" width="80"><b>Example:</b></td>
 
<td align="left" valign="top" width="100%"> The Particle agent in the Accretion 3D project checks if it is next to at least one stationery Particle in the same layer or in the layers above (+1) or below (-1). If so, it changes itself to be a stationery Particle, increments a count and maps its color to a shade, based on the current count of stationery particles.  
 
[[Image:Next to condition example.png|500px]]</td>
 
</tr>
 
 
 
</table>
 
  
 
[[Category:AgentCubes_Conditions]]
 
[[Category:AgentCubes_Conditions]]

Revision as of 03:05, 20 April 2012

Next to condition.png

Next to expanded.png

Definition: True if there is a certain number of agents adjacent to me. Only check the 8 immediatly adjacent agents around me. 
Parameters: comparator mathematical operator
number how many
shape what shape
Example: The Particle agent in the Accretion 3D project checks if it is next to at least one stationery Particle in the same layer or in the layers above (+1) or below (-1). If so, it changes itself to be a stationery Particle, increments a count and maps its color to a shade, based on the current count of stationery particles. Next to condition example.png