Skip to content

Swimming fish – lights and reflection

It is a continuous research about OpenGL.

First in Lab 4, I only built a simple goldfish with several components. It tested the build things with polygon.

Second in Lab 5, I added mouse listener with a list to control the fish to circle, swim or rotate. It tested the translate and rotate function.

Third in Lab 6, I added collision situation, when the fish swim to the edge of the screen, it will change the swimming direction. Also added sunlight to test the light code. Left key mouse listener is tested to stop or restart the fish swimming.

Forth in Lab 7, it includes all the function realized in Lab 6. Additional mouse listener with a list to change the color set of the fish. It aims to test the color reflection with the same light source (sun light).

Finally in Lab 8, the mouse listener contains two lists - one for color change and another to change the light source. It aims to test the influence with different color and different light source.

Leave a Reply

Your email address will not be published. Required fields are marked *