CS 248 - Introduction to Computer Graphics
Autumn Quarter, 2008
Marc Levoy
We have prepared a virtual machine for the first two assignments of the class. To run our virtual machine you'll need to download and install VMware Player from http://www.vmware.com/products/player/ for windows or linux, or a trial version of vmware fusion from http://www.vmware.com/products/fusion for mac. Feel free to enter completely false personal information in their registration box. They won't verify the email address you give them. After installation you will probably need to reboot.
Next you need our virtual machine. First make sure you have at least 4.5 gigabytes free on your hard drive. Download the virtual machine from http://www.ethandreyfuss.com/CS248VM.zip, and uncompress it somewhere. If downloading it is going to be a problem for you, see Ethan for a copy on a DVD. A unzip utility able to handle the large file size will be needed. One good choice is 7-zip (http://www.7-zip.org). You can delete the zip file after decompression to save space. Due to the large file sizes involved expect downloading may take a while (~10 minutes) even on an on-campus wired connection. Expect decompressing to also take several minutes depending on machine.
Find where you decompressed the VM, and double click on the "Ubuntu.vmx" file to boot the virtual machine inside VMware player or VMware fusion. If a dialog pops up asking if you moved or copied the VM, say that you copied it. If a dialog appears asking if you'd like to take ownership of the VM, say yes. If you are on an AMD machine and receive a warning that vendor of the processor of your computer differs from the one used to create the snapshot, click OK. The VM should begin booting. At the login screen type the username "toor" and the password "password". Once inside, if the VM resolution is not to your liking, you may wish to go to System->Preferences->Screen Resolution inside the VM and pick a different resolution.
To begin programming bring up a console window by clicking the black terminal looking icon with the ">_". Then navigate to the assignment1 directory by typing "cd Desktop\assignements\assignment1" (tab auto-complete is your friend). Type "make" and you should see make: 'paint' is up to date. To compile your code in the future after you make changes simply type "make" from this directory. Type "ls" to see the list of files in the directory. you should see "paint" in green. That is the assignment executable. To run it type "./paint &". The "./" means current directory, and the "&" at the end means you want it to run in the background so you can keep using the console. Drag the resulting windows around and you should see two "Canvas" windows and a "./paint" window with some UI widgets. You can paint green pixels on one of the canvases by clicking on it with your mouse. You will be modifying this starter code so that you can draw on one canvas, see a visualization of the current drawing brush on the other canvas, and control various parameters of the brush with the UI widgets in the third window. To bring up the code type "emacs paint.c &" at the console. Read through the provided "paint.c" and some of the files from the xsupport direcotry and you should be off and running. Happy hacking!
The virtual machine's user name is toor and its password is password.
When you get it working you should see this:
Feel free to customize the VM however you want, it's yours now. Want to install Eclipse? Go for it! Just don't expect the TAs to support whatever crazy setup you come up with. And make sure that the assignments will still run on the unmodified VM, which is what we will be using for grading.
If you are unfamiliar with a unix environment check out http://cslibrary.stanford.edu/107/UnixProgrammingTools.pdf for loads of information.
Having problems? Post to the newsgroup su.class.cs248