Project Idea & Plan of Implementation
For my project, I plan on coding a bubble. I find implementing this idea into code challenging, but also fun. I plan on coding the bubble with triangle meshes all tied together with springs like how we did with lab 5 of this course. After some research, I found that spheres in computer programming are not all circular, but they are a bunch of triangles put together.
PROJECTSample Image From Online
![](bwave.gif)
Working With Animation/Lab 6
For lab 6, our main objective was to mess around with some code given to us and ultimately make an animation. We then export that animation into a gif using a function given to us. This was the end result I got after fiddling with the code a bit. I tried to create an illusion where the ball seen is actually being thrown into the distance and bouncing into the wall in the background. It is not a very good animation, but it is a start.
Animation Created in Lab 6
![](lab6.gif)
Shaders in openGL
For lab 8, we had to work with vertex and fragment shaders. The shaders were already created, but we had to modify the program to make one image fade out while another image fades in. Both of the images are outputted onto a triangle. Below is a gif animation I created of what my program outputs.
Fade created in Lab 8
![](fade.gif)
Terrain in openGL
For lab 9, our main objective was to render a terrain. To do this, we used heightmaps which are just files containing height positions. We then drew triangles at each of the positions and gave them a color. Below is an image of the terrain I generated. The height map I used was for White Wolf. I also added some movement to the water as an extra feature.
Terrain in Lab 9
![](terrain.gif)
Project progress #1
The first thing I had to do for my project was generate a 3d sphere. I used the pball program as a guide for building vertices on a circle. I did have to modify it a bit and add a 'z' component since my object is in 3d. I used glut.h as the main framework of the program and below is the 3d sphere I was able to generate.
3d Circle
![](proj2.gif)
Project progress #2
The next step was to implement physics movement on the sphere. All of the vertices are treated as masses and I connected springs between all of them like how we did with the jello in lab 5. I used lab 5 as a reference for all of the physics of the masses and the springs. I had to modify most of it due to my vertices having three components: a 'x', a 'y', and a 'z'. After some time, I was able to replicate bubble movement as shown below.
Sphere with bubble movement
![](proj3.gif)
Project progress #3
After implementing the physics movement, I had to focus on the transparency of the bubble object. For transparency, I had to enable gl_blend and use the glBlendFunc. To test if the transparency actually worked, I made a checkerboard floor and some walls with binded textures on them. After debugging the code, I was finally able to generate everything to my liking as shown below.
Bubble transparency
![](proj6.gif)