Translated example on slide to project

Used MATLAB example code from slides and attempting to make it work in
OpenGL