Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
add information about the project
  • Loading branch information
sfadiga committed May 15, 2019
1 parent 0c0b8b1 commit 8c3a241
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
# Water Ripple - Animation of a water ripple effect over an selected image using Qt Widgets
# Water Ripple

## Animation of a water ripple effect over an selected image using Qt Widgets

The idea and some of the code were copied from: http://agilerepose.weebly.com/water-ripple.html

Example of the application:

![](https://github.com/sfadiga/WaterRipple/blob/master/anim.gif)

the idea behind this code is to update a pixel table from the original image making the origin of the efect in (x,y) to propagate changes on the pixels in 4 directions, basically a loop updates the frame buffer using the following pseudo-code:

```
damping = some non-integer between 0 and 1
begin loop
for every non-edge element:
loop
Buffer2(x, y) = (Buffer1(x-1,y)
Buffer1(x+1,y)
Buffer1(x,y+1)
Buffer1(x,y-1)) / 2 - Buffer2(x,y)
Buffer2(x,y) = Buffer2(x,y) * damping
end loop
Display Buffer2
Swap the buffers
end loop
```
the original idea is well explained here:
https://web.archive.org/web/20160418004149/http://freespace.virgin.net/hugo.elias/graphics/x_water.htm

0 comments on commit 8c3a241

Please sign in to comment.