The following 329 words could not be found in the dictionary of 615 words (including 615 LocalSpellingWords) and are highlighted below:

about   accomplish   Add   adding   all   All   an   and   answer   answers   anything   application   aren   Art   Assignment   assignment   assignment1   assignments   at   back   based   basics   Be   be   been   before   being   blank   both   branches   but   by   calls   can   certain   colors   comes   command   compile   compiled   compiler   complete   completed   computer   computers   connect   contain   contains   control   Conway   correct   courses   creating   Cross   cs148   curve   curves   cygwin   Cygwin   Date   develop   development   Display   display   docs   does   Download   Draw   draw   drawn   Due   due   during   edu   en   encourage   environment   examples   exit   experimental   explains   extension   fact   familiar   familiarize   fiddle   filling   fix   following   for   forward   Fractals   freeglut   from   function   functions   future   Game   game   Generative   get   give   gl   glut   Goal   going   good   Grading   graphics   gz   hasn   how   How   ideas   if   If   in   In   include   including   Init   initialization   input   Inspiration   install   installed   installing   Installing   instructions   instructors   interesting   into   January   just   Just   jwz   keys   know   Koch   labelled   least   leaves   level   libraries   Life   life   like   lines   link   Linux   ll   locally   lot   Mac   main   Makefile   many   mathworld   might   minimum   Mode   modes   moving   multiple   myth   Nate   need   Needless   new   newer   note   Note   notes   number   of   On   on   one   One   only   Open   option   or   Ortho   otherwise   packaged   page   pages   parameter   passed   personal   Platform   platforms   possible   present   primitives   program   programmer   programs   Project   properly   providing   questions   Read   receive   redefined   remotely   reshape   resized   Resources   Robbins   run   running   Saver   say   saying   Scale   scale   screen   Screen   screenshots   script   see   See   seems   select   server   session   set   setting   setup   should   similar   Simple   simple   simplest   skeleton   Skeleton   Snowflake   snowflake   some   something   Space   space   specify   Spirograph   Spirographs   ssh   stanford   star   stars   start   started   startx   stdlib   Steps   Studio   submit   successfully   support   supported   sure   system   systems   tar   that   The   the   their   them   Then   then   these   this   This   through   to   To   too   trees   triangles   trouble   try   two   ug   unix   up   updated   use   Use   used   user   using   various   ve   version   versions   very   Viewport   Visual   vnc   vs   want   We   we   well   What   When   when   why   wikipedia   will   window   Windows   with   wolfram   work   workaround   Write   write   X11   xcode   xscreensaver   You   you   your   Your   yourself   zip  


Assignment 1 - Generative Art

Goal: To familiarize yourself with the basics of OpenGL and GLUT by creating a simple OpenGL application.

Due Date: January 18, 2007


  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.

  2. 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?
    2. What does the parameter to glutInitDisplayMode() in main() specify?
    3. What do the calls to glOrtho() and glViewport() in the reshape() function accomplish? If the window is to be resized, why might we want to change this?
  3. 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.
  4. 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.

Skeleton Code
The skeleton code contains a very simple GLUT based OpenGL program. All it does is create a window and draw a blank screen. We are providing the code packaged for various platforms/IDEs.

Just the code


Code + Visual Studio Project

Code + XCode Project

Code + Cross Platform Makefile (Linux, MacOS X)



Inspiration for What to Draw
You may draw anything interesting, but here are some ideas to get you started.

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.


  1. I've ssh'd into or used vnc to connect to a myth computer and compiled the code successfully, but when I try to run it I get an error like this: freeglut (./assignment1): OpenGL GLX extension not supported by display ':1.0'. What's going on?
    • When using an X based system, you need the GLX extension to be present to run OpenGL programs. The vnc server installed on the myth computers doesn't support this. If you have an X server installed locally, you can forward X (including GLX) through your ssh session by adding the -Y option to your ssh command. On Mac you can use their X11 server, you'll just need to install it, run it, and then ssh using the -Y option. Then, any X program you run remotely will display locally. On Windows you need to install an X server. One free one comes from cygwin ( See Installing Cygwin/X for instructions on installing and using it. Note you'll have to install the version of the server with GLX support (labelled experimental, but seems to work well). You may also have to fiddle with the startx script to get it to start the correct X server. Needless to say, this can be a lot of trouble. We encourage you to develop on your personal computer if possible.

  2. I'm using Visual Studio and Nate Robbins' GLUT and the compiler is saying '_exit' is being redefined. How do I fix this?
    • This is due to the fact that GLUT hasn't been updated to work properly with newer versions of Visual Studio. The simplest workaround is to include stdlib.h before including glut.h.