CodeBase - Water Wave Effect
Return to the CodeBase listing
Category: 2D Effects
Version: 2.0
Information
Uploaded: 25th Sep 2003 18:25
Modified: 2nd Oct 2003 18:00
Author: skovron
Summary
Use your mouse and LMB to generate water waves...
Full Description
This code loads some image, than for each pixel position it calculates displacement. Displacement points to pixel which replaces current pixel. It could produce very chaotic bitmaps but displacement is calculatet with use of heightmaps. Each coord of heightmap holds wave amplitude at that position so calculationg difference between neighbor amplitudes (along each axis) we simply calculate displacement for pixel position<br /> <br /> It's hard for me to explain it in more detail becouse my english is very bad.<br /> Well, sorry for that.<br /> <br /> Now prepare some image, but remember it should be very small, the bigger the bitmap is the more loops have to execute<br /> I use 320x240, with 640x480 my computer has a little troubles<br /> <br /> Move mouse and use left button, than try to change some properties inside the code<br /> <br /> Well enjoy!<br /> <br /> New version 2.0 has some optimalizations made by D Man
Comments
No comments yet.