Advertisement
Guest User

Untitled

a guest
Feb 13th, 2013
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  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];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement