I have implement one game application .In that game i want to implement wateer animation.PLease give me idea about that.
same like:http://www.heikobehrens.net/2009/10/02/burlington-ducky-iphone-app/
I have implement one game application .In that game i want to implement wateer animation.PLease give me idea about that.
same like:http://www.heikobehrens.net/2009/10/02/burlington-ducky-iphone-app/
Sure, easily done. Start by solving the Wave Equation in two dimensions:
http://en.wikipedia.org/wiki/Wave_equation
Then write a program that uses the simulated wave to distort the image.
UPDATE: kvb points out that this might be rather more work than necessary, and now that I think about it a bit more, it probably is. Rather than solving the wave equation analytically, you could instead write a simple physics engine that simulates the surface in some other way. For example, you could represent the surface as a flat grid of points where each point is connected to its neighbours by springs. The physics of springs are easy to simulate; you just make a restoring force proportional to the deflection of the spring. Make sure to add a damping effect so that the system settles down eventually. Moving one of the points above the plane and stretching its springs should send ripples out through the mesh.