Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- velocity[x,y] += (height[x-1,y] +
- height[x+1,y] +
- height[x,y-1] +
- height[x,y+1])/4.0 - height[x,y];
- velocity[x,y] = velocity[x,y] * DAMPING_FACTOR;
- height[x,y] += velocity[x,y];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement