Lake Reflections with Java

  
 
A Java program adds a rippling reflection to an image.
You can pause the rippling motion by clicking on the image.
 
The program to create the rippling effect is called "Lake" and was written by David Griffiths.  It can be found at The Java Boutique.  In the demonstration of this program shown here, I supplied an image which I modified from a scene in Sierra King's Quest V.
 
 
Java Programming Notes 
In order to build a reflection of the scene, an inverted image is first created by reversing the order of the lines of information in the image.  Then the information in the inverted image is displaced, based on a sine function to create waves which resemble water ripples.
 

Copyright on text © 1997 Margaret Brown
 
 
   WEBBITS Home    Back to WEBBITS First Java Page