Computer Graphics

The following projects are work I did for CS 450 (Intro to Computer Graphics). All of them were written in C++ using the OpenGL API.

Catmull-Rom Curves

For this project, I plotted points and used the Catmull-Rom formula to draw lines that smoothly connect them. The white dots in the video represent the points the lines run through as well as points that guide the ends of the curves. I then animated the points, which alters the lines as well.


Shaders

The purpose of this project was to demonstrate the use of fragment and vertex shaders. I wrote a vertex shader that distorts the shape of a sphere and a fragment shader that colors two regions of the sphere; one region colors a given point based on its current coordinates, while the other region cycles through colors over time. As shown in the video, the shaders can easily be toggled.


Lighting

For this project, I used lighting to illuminate objects of varying texture and shine. The blue light is an animated point light that shines in all directions. The white light is also a point light, but is stationary. The red light casts a spotlight on each planet. In the video, I demonstrate the effect of each light by turning them off and on in turn.


Final Project

For my final project, I combined elements I learned throughout the course – animation, textures, lighting, and shaders – to create an animated yo-yo scene.

Print Friendly, PDF & Email