swarm.space
Interface Diffuse2d
- All Known Implementing Classes:
- Diffuse2dImpl
- public interface Diffuse2d
- extends Ca2d, Ca2dS
2d difussion with evaporation..
Discrete 2nd order approximation to 2d diffusion with evaporation. Math is done in integers on the range [0,0x7fff].
Method Summary |
java.lang.Object |
stepRule()
Run discrete approximation to diffusion. |
Methods inherited from interface swarm.defobj.Drop |
drop |
Methods inherited from interface swarm.defobj.DefinedObject |
compare,
describe,
describeID,
getDisplayName,
getTypeName,
getZone,
perform,
perform$with,
perform$with$with,
perform$with$with$with,
respondsTo,
setDisplayName,
xfprint,
xfprintid,
xprint,
xprintid |
stepRule
public java.lang.Object stepRule()
- Run discrete approximation to diffusion. Roughly, it's newHeat = evapRate * (self + diffuseConstant*(nbdavg - self)) where nbdavg is the weighted average of the 8 neighbours.
- Specified by:
- stepRule in interface Ca2d