OpenGL Graphics
These projects showcase some of my OpenGL work during my computer graphics apprenticeship with former Nintendo developer Mike K.
This section highlights a procedurally generated tree, a particle system along a smooth curve, a ray tracer demo, and a fun final video.
I loved this L-systems tree. The program reads an input string from a file to describe drawing instructions for a tree. It uses a context-free grammar data structure to procedurally generate a fractal-like tree. A simple change to the input can alter the generated tree, allowing for a wide variety of forms. The drawn lines are then rendered as cylinders with interpolated girth from the base to the tip, with end-faces aligned to the XZ-plane.
This demo also captures the user’s pointer coordinates in screen space and applies a rotation-about-an-arbitrary-axis matrix to adjust the scene view. An arena is loaded with a texture applied, and various lights are strategically placed throughout the scene.
The following is a video demonstration that shows the tree with each iteration of the algorithm, as well as its environment with camera controls.
The following 4 images show the first 4 iterations of this algorithm, followed by a polished wallpaper.
Here you can view the project source code.
This project features a circular array of eight control points forming eight quadratic Bézier curves. A particle emitter interpolates along the curves, while individual particles move outward at regular intervals and smoothly transition their colors along a texture map.
Here you can view the project source code.
This short demo presents a ray tracer that utilizes the Phong reflection model. It determines pixel colors by casting rays into the scene and back-tracing sample colors from reflected surfaces. The lighting is calculated as a combination of specular highlights, diffuse reflections, and ambient illumination. The reflections in the spheres reveal the two primary scene lights.
This final demo shows an icosahedron rotating along two axes based on cosine waves, illuminated by a color-changing light.