Guest User

Untitled

a guest
Feb 13th, 2013
251
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. velocity[x,y] += (height[x-1,y] +
  2. height[x+1,y] +
  3. height[x,y-1] +
  4. height[x,y+1])/4.0 - height[x,y];
  5.  
  6. velocity[x,y] = velocity[x,y] * DAMPING_FACTOR;
  7.  
  8. height[x,y] += velocity[x,y];
RAW Paste Data