Description: The project is to simulate the water ripple effects. It used the OpenGL buffer technique.
It used 2 arrays of words. These arrays will hold the state of the water. One holds the current state, the other holds the state from the previous frame. It is important that to have 2 arrays, since it need to know how the water has changed since the last frame, and the frame before that.
The height of the wave two frames is proportional to the size of the arrows. So as long as the previous two frames are remembered, it is easy to work out the change in height of every part of the wave.
So, take a look at the code again. When the loop starts, Buffer1 contains the state of the water from the previous frame and Buffer2 has the state before that . Buffer2 therefore has information about the vertical velocity of the wave.
USAGES: Space-bar : To drops the ripples of water for effect.
m: Exit full screen mode
f: Full screen mode.
x: Exit program.
Project Code: Download
We can create the water ripple effect using the HTML5 Canvas, you can find the tutorial here http://tinyurl.com/3z5j2r7
ReplyDeleteHey i m n ot able to download the code...its copyright protected it seems..:(
ReplyDeletegive your id will mail d code....
ReplyDeleteThis one of the fine project i seen.....thanks for uploading
ReplyDeleteplease send me the code.plz,plz
ReplyDeletehow to run this project in code blocks please reply
ReplyDeletecan u please explain this code in more detail.i mean with comments
ReplyDeletewhat yu didn't get post i will tell u about it.......
ReplyDeleteas u do with the normal code in there
ReplyDeleteCan i find an explanation for the functions used please!
ReplyDelete