Basic Water Wave Simulation

By Nhi To

 

Description:

For my final project I wanted to do a simple water wave simulation which is what I ended up with as shown by the screen shots.

The approach I took was modeling waves on a mesh. I then added texture on the mesh so you could actually see the waves.

For the wave calculation I used y = a*sin(f*x).

 

User Guide:

Use the right mouse to rotate the the water mesh.

Use the left mouse to increase wave speed.

Press the 's' key to switch from wire frame or texture mode.

Press 'b' to increase the amplitude.

Press 'a' to decrease the amplitude.

Screenshots:

 

 

References

http://www.vterrain.org/Water/ - Water Rendering and Simulation

http://www.opengl.org - OpenGL Reference Site