CMPT 361 - Assignment 0 (0%)

Just to get you started

This assignment is just to get you started and ready for the course. It will NOT be graded.
  1. Unix or Linux: Unix (or Linux) is an important operating system. If you type in "unix tutorial" in your favorite search engine and you'll find tons out there. This may be a good one.

  2. Editors: Historically, editors in UNIX have been very powerful, but quite cryptic. However, more modern incarnations of Unix systems (especially the various Linux distributions) have nice Windows-like GUI editors. But in case you're interested, there are the standard UNIX editors: vi and emacs. Emacs is a powerful text editor within which you can do many things, like debugging, reading email and news and who knows what else. All its functions can be extended by yourself (using Lisp) and hence there are no limits in customizing it. However the learning curve is a little steep in the beginning. You can certainly use other text editors (like vi, jot, edit, etc.). Vi is also very powerful, but also has a steep learning curve. Type man vi at a UNIX prompt to find out more.

  3. Debugging: This will occupy some of your time. The main thing is to have a plan on how to debug your program. Start simple and build your program step-by-step, so you can debug each step and figure out whether there are errors in each step before you move on. Always use simple data sets at first! In terms of UNIX debuggers - the standard is gdb. This is certainly a worthwhile debugger to check out. A little bit more sophisticated is ddd (which is an interface to gdb), which is also installed on the graphics machines.

  4. Makefiles: In order to get everything to run, you should use makefiles. Although it might not seem like it in the beginning, they simplify things, especially when your program become really large. Here is a simple makefile, that should work (adapted to your files) in the CSIL environment. Don't waste too much time writing sophisticated makefiles at this point. Just use and understand the one I provide you here.

  5. IDE's: People like development environments for their ease of use. Be careful though, you need to submit a simple makefile with your code, that will be used to compile your program!! No IDE is being used to compile your code. This being said, kdevelop is installed on the lab machines. eclipse is another popular one and has c/c++ extensions (all of which are installed in CSIL).

  6. Get ready for OpenGL programming:

    Be ready to do a great deal of OpenGL (GL stands for "graphics library") programming in C/C++. You are expected to be proficient in C or C++. I would not allow the use of another programming language, such as Java, to write your assignments in this course. Neither will I spend time teaching or reviewing C/C++ programming.

    It is important to note that this course is not about OpenGL programming. It is about concepts and algorithms related to image synthesis and graphics display. There will only be one lecture on OpenGL, where some basics will be covered. You are expected to learn and be good at OpenGL programming pretty much on your own.

    In this class we will focus on OpenGL 3.x. I recommend to have the OpenGL Superbible, 5th edition handy. You need the 5th edition in order to do OpenGL 3.x. Please be aware that there are some modifications that need to be done to get it all working on a specific OS. Your code has to run on the linux computers in the CSIL lab! If it doesn't, you'll get zero points.

    Courtesy to your TA, Wallace, there are a couple of good online tutorials. There is a short one and a more complete one.

  7. Install OpenGL on your Linux: You need to install three libraries on a Linux machine: OpenGL, GLUT (freeglut), and GLEW. On the CSIL Linux workstations at school, these libs have already been installed. On your home computer, here is an instruction for setting up OpenGL environment in Ubuntu Linux.

  8. Test the sample example: In this assignment, we provide you the sample code for 2D Sierpinski gasket, togerther with the Makefile. Uncompress the archive into a folder, and type "make" in the terminal. An executable file called "Gasket" should be created. Type "./Gasket" in the terminal to run the app.

    Richard Zhang / haoz at cs dot sfu dot ca