== Assignment 1 == '''Goal''': To familiarize yourself with the basics of OpenGL and GLUT by creating a simple OpenGL application. '''Due Date''': January 18, 2007 '''Steps''' 1. Download the skeleton code and setup GLUT with your development environment to get the code to compile and run. The ["GLUT HOWTO"] explains how to do this if you aren't familiar with setting up and using libraries with your development environment. 1. Read up on OpenGL and GLUT and answer the following questions. Be sure you can answer all these questions before moving on. 1. In a GLUT program, how is control passed back to the programmer? How is this set up during initialization? 1. What does the parameter to glutInitDisplayMode() in main() specify? 1. What do the calls to glOrtho() and glViewport() in the reshape() function accomplish? 1. Add to the program to draw something (anything!). Your completed program should at a minimum: * Draw using at least two primitives (e.g. lines and triangles) * Draw using multiple colors * Use some user input to do something in the program. This could be as simple as using the number keys to select one of multiple modes. 1. Write up and submit your program. Your write up should contain both the answers to the questions and any notes we should know about running your program. '''Resources''' * Skeleton code (attachment:main.cpp) - contains a very simple GLUT based OpenGL program. All it does is create a window and draw a blank screen. * ["OpenGL Resources"] * ["GLUT HOWTO"] '''Inspiration for What to Draw''' [[BR]] You may draw anything interesting, but here are some ideas to get you started. * [http://mathworld.wolfram.com/Spirograph.html Spirographs] or similar functions (note the "See Also" pages too). * Fractals, drawn to a certain level, see e.g. the [http://en.wikipedia.org/wiki/Koch_snowflake Koch Snowflake] * Simple [http://en.wikipedia.org/wiki/Space-filling_curve space filling curves] * Simple [http://en.wikipedia.org/wiki/L-system L-systems], e.g. use them to create simple trees (lines for branches, triangles for leaves) * [http://en.wikipedia.org/wiki/Conway's_Game_of_Life Conway's game of life] * [http://www.jwz.org/xscreensaver/screenshots/ XScreenSaver] has many good examples '''Grading Scale''' Grading for this and all future assignments is based on a four star scale. On this assignment you can receive: * 4 stars for a complete assignment * 1 star if you give only the answers to the questions * 0 stars otherwise '''How to submit''' * Create a new wiki page with your answers to the questions and link to it from your personal wiki page. * Email a copy of your updated main.cpp to the instructors.