Welcome to the Creatures Wiki! Log in and join the community.

Difference between revisions of "ELAS"

From Creatures Wiki
Jump to navigation Jump to search
m (physics link)
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<b>ELAS</b> is a [[CAOS]] command used set or output how [[physics|bouncy]] an agent is.
+
'''ELAS''' is a [[CAOS]] command used to set or output how '[[physics|bouncy]]' an agent is.
  
==ELAS for Input==
+
==Usage==
Syntax:
+
Syntax: ''ELAS elasticity(int)''
<i>ELAS elasticity(int)</i>
 
  
Standalone command. <br />
+
Sets the elasticity of [[TARG]] as a percentage. After bouncing, the agent's new upward speed will be ''elasticity'' percent of the downwards speed with which it hit the ground.
Sets the elasticity of an agent in percent, the agent will bounce X percent of the height it fell from, X being the number stored in its ELAS property.
 
  
==ELAS for Output==
+
Syntax: ''ELAS''
Syntax:
 
<i>ELAS</i>
 
  
Used in place of a numeric constant or variable.
+
Returns the elasticity of [[TARG]] as an integer percentage.
<br />Returns the number stored in the current TARGs ELAS property.
 
  
 
==Examples==
 
==Examples==
<i>ELAS</i> being used in the command line to make [[HOTS]] bounce perfectly:
+
''ELAS'' being used in the command line to make [[HOTS]] bounce perfectly:
 
<pre>
 
<pre>
 
TARG HOTS ELAS 100  
 
TARG HOTS ELAS 100  
 
</pre>
 
</pre>
 
  
 
----
 
----
 
  
 
Being used in the command line to output the ELAS of HOTS:
 
Being used in the command line to output the ELAS of HOTS:
Line 29: Line 22:
 
TARG HOTS OUTV ELAS
 
TARG HOTS OUTV ELAS
 
</pre>
 
</pre>
 +
 +
==Equivalent in the real world==
 +
ELAS is equivalent, in a simple mechanical model, to [[Wikipedia:Newton|Newton]]'s [[Wikipedia:coefficient of restitution|coefficient of restitution]], ''e'', between the ground and the agent, where <math>e = \frac{\mbox{speed of separation}}{\mbox{speed of approach}}</math>.  <math>0 \le e \le 1</math>, and ''e'' is 1 for perfectly elastic collisions (no loss of kinetic energy) and 0 for perfectly inelastic ones (the objects coalesce).
 +
 
[[category:C3 CAOS Commands]]
 
[[category:C3 CAOS Commands]]

Revision as of 00:20, 30 November 2016

ELAS is a CAOS command used to set or output how 'bouncy' an agent is.

Usage

Syntax: ELAS elasticity(int)

Sets the elasticity of TARG as a percentage. After bouncing, the agent's new upward speed will be elasticity percent of the downwards speed with which it hit the ground.

Syntax: ELAS

Returns the elasticity of TARG as an integer percentage.

Examples

ELAS being used in the command line to make HOTS bounce perfectly:

TARG HOTS ELAS 100 

Being used in the command line to output the ELAS of HOTS:

TARG HOTS OUTV ELAS

Equivalent in the real world

ELAS is equivalent, in a simple mechanical model, to Newton's coefficient of restitution, e, between the ground and the agent, where <math>e = \frac{\mbox{speed of separation}}{\mbox{speed of approach}}</math>. <math>0 \le e \le 1</math>, and e is 1 for perfectly elastic collisions (no loss of kinetic energy) and 0 for perfectly inelastic ones (the objects coalesce).