Code snippet from my computer graphics course