     dAngle = newAngle - @angle0
     @angle0 = newAngle
     rotateView dAngle
-    
-  mouseUp: (e)->
-  
-                    
+                      
 # ============ Bind Events =================
 E("btn-reset").addEventListener "click", doReset
 E("btn-step").addEventListener "click", doStep

  xyk = dx*dy*k
  yyk = dy*dy*k
  
  moveMatrix =[xxk+1, xyk,   dx,
               xyk,   yyk+1, dy,
               dx,     dy,     dt]
  tfm = M.mul moveMatrix, tfm
  redraw()
    
rotateView = (angle) ->
  s = Math.sin angle
  c = Math.cos angle
  rotMatrix = [c, s, 0.0,
               -s,  c, 0.0,
               0,  0, 1.0]
  tfm = M.mul rotMatrix, tfm
  redraw()        
  
redraw()
class MovingDragger
  constructor: (@x0, @y0) ->
  mouseMoved: (e)->
    [x, y] = getCanvasCursorPosition e, canvas

  context.fill()
  return      
  
mooreNeighborhood = (n, m, appendRewrite)->(chain)->
  #reutrns Moore (vertex) neighborhood of the cell.
  # it contains N cells of von Neumann neighborhood
