swarm.space
Interface Diffuse2d

All Known Implementing Classes:
Diffuse2dImpl

public interface Diffuse2d
extends Ca2dS, Ca2d

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
 Object stepRule()
          Run discrete approximation to diffusion.
 
Methods inherited from interface swarm.space.DblBuffer2d
putObject$atX$Y, putValue$atX$Y, updateLattice
 
Methods inherited from interface swarm.space.Discrete2d
copyDiscrete2d$toDiscrete2d, fastFillWithObject, fastFillWithValue, fillWithObject, fillWithValue, getObjectAtX$Y, getSizeX, getSizeY, getValueAtX$Y, setDiscrete2d$toFile
 
Methods inherited from interface swarm.objectbase.SwarmObject
getCompleteProbeMap, getProbeForMessage, getProbeForVariable, getProbeMap
 
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
 

Method Detail

stepRule

public 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