Esmeralda Osornio 3480 - Computer Graphics Project Idea Water Ripples

Description:

I will make water ripples that are caused be a droplet using the sin funiction and lab 8's ray tracer.

My computer graphics elements:

1. bump-mapped surface 2. motion damping 3. simulation of fluid motion

To demonstrate my study and research:

1. I will make a gif animation 2. I will use lab 8 as my starting point.

Progress:

First Attempt: Sine floor and sphere has transparency Mathematical sine function will be used to move the ripples of the water

gif goes here

Second Attempt: Floor has been modified based on lab 11 A water drop cause the ripples

gif goes here

Third & Fourth Attempt: Left animation: Fixed the amplitude by creating an offset that increase for each render Added a refraction function for the sphere (doesn't seem to work) Right animation: Fixed the offset again, since the animation above seems abnormal towards the end

gif goes here gif goes here

Fifth & Sixth Attempt: Fixed the offset, distance, & amplitude Animation on the left has an amplitude of 32 Animation on the right has an amplitude of 16

gif goes here gif goes here



Lab-15 work done

gif goes here gif goes here

The left animation seems to recoil back into the center towards the end. In the right animation, it's fixed.

gif goes here ray trace gif goes here

Fixed camera position

Now that I have fixed when the ripples show appear, I will work on "flatting" the ripples after a certain point starting from the center. ~check above for final attempt~





Final Attempt: There are two important items that are needed for my amimation to look the same as the animation on the right. 1. Multiple waves from the center I thought of one way to make this. I thought that maybe if I save the previous vector, calculate the current vector, and then trace both vectors that it might show the waves from the first droplet and the second droplet as the same time. However, I can only have one vector equal to the closehit.norm. Meaning that I can only have one vector drawn. What I did instead is have the amplitude greater when the second droplet hits the surface. First droplet's amplitude = 8.0 Second droplet's amplitude = 32.0 However, this did not really help accomplish anything regarding the multiple waves, since it just overrides the previous waves. 2. "Flatting" the ripples from the center after the last droplet One way that I thought that I can do this is by using the rules for stretch and compression for transformation in equations. For example, the image of graphs below illustrate stretch and compression for the sine function.

gif goes here gif goes here
picture goes here

sin(x) = normal sine wave sin(1/2 * x) = stretch horizontally 1/2 * sin(x) = compressed vertically

Final Attemp 2:

gif goes here




Failed Attempts:

gif goes here picture goes here

The animation on the left is a failed attempt of trying to get the sin waves to move. (refraction function not present) I tried changing the amplitude, since the vectors depend on amplitude as well as other values. I also tried putting the entire process in the if statement of the SURF_WATER in a for loop. However, when the animation started, the surface was not doing anything. The image of the right is a failed attempt of the refraction function. I used the scratchapixel function; however, it still didn't seems to work.

Link to Scratchapixel

An example:

ray trace gif goes here



The screenshot & animations from my lab-8 is below:

ray trace image goes here
ray trace image goes here
ray trace image goes here

The animation from my lab-6 is below:

rocket goes here