     window.requestAnimationFrame(@draw)
 
 MOUSE =
-  pos: undefined
+  pos: 
+    x: 0
+    y: 0
   mass: 1000
 $ ->
   MOUSE = 

    @pos = new Vector(x, y)
    @vel = new Vector(0, 0)

    @G = 10000000

  force: (pos, vel) =>
    difference = Vector.subtract(MOUSE.pos, pos)
    dist_sq = Math.max(difference.mag_sq(), 25)

    g_force = @G * MOUSE.mass * @mass / dist_sq
    k = 10000
    spring_force = k * Math.sqrt(dist_sq) - 1 * @vel.mag()

    return Vector.unit(difference).s_mult(Math.min(g_force, spring_force))

  update: (canvas, ctx, tick) =>
    f = @force(@pos, @vel)

    start = Date.now()
    ctx = @canvas.getContext("2d")
    ctx.globalCompositeOperation = 'source-over'
    ctx.fillStyle = "rgba(0, 0, 0, #{255 * 2 * @tick})"
    ctx.fillRect(0, 0, @canvas.width, @canvas.height)
    #ctx.clearRect(0, 0, @canvas.width, @canvas.height)

    for particle in @particles
      particle.update(@canvas, ctx, @tick)
