| Assignment 1 Information |
To create the gzipped tar archive, do the following:
$ cd assign1 $ gmake clean $ cd .. $ tar cfz assign1.tgz assign1
The "gmake clean" command will delete your object files and executables. We don't want those --- we will compile your code ourselves. There is a 100K limit on the size of the archive file that you can upload. This should be plenty for just your source code and any examples that you created to test your program.
Remember that your code must compile and run on the CS Suns. In order to test this, you can do the following:
$ ls assign1.tgz assign1.tgz $ mkdir tmp $ cd tmp $ tar xfz ../assign1.tgz $ cd assign1 $ gmake $ ./assign1 Problem1.txt
After you have verified that your archive file will properly unpack and your code compiles and runs in the CS Sun environment, you can upload it to the web server.
The number of uploads is unlimited, but we will only look at the last submission.
In addition to the CGAL files, you may also want to download the documentation in your favorite format.
After you install CGAL, it will tell you what your CGAL_MAKEFILE variable should be set to. You need to put this in your shell initialization file. On my Linux machine I use the bash shell, so in my .bashrc file, I put the line:
export CGAL_MAKEFILE=/usr/local/CGAL/CGAL-3.0/make/makefile_i686_Linux_2.4.22-10mdk_g++-3.3.1
In order to use DOLT, you will need the Mesa library (which provides OpenGL graphics stuff) and GLUT (which provides an easier interface to OpenGL/Mesa that we've used in DOLT). I think these things are fairly standard nowdays. On my Mandrake 9.2 Linux system, I have the following packages installed:
libMesaGL1-5.0.1-5mdk Mesa-5.0.1-5mdk libMesaGLU1-devel-5.0.1-5mdk libMesaglut3-5.0.1-5mdk libMesaGLU1-5.0.1-5mdk libMesaglut3-devel-5.0.1-5mdk
Installation instructions for DOLT are on the above page. That documentation is also included in the distribution. (The documentation is a little old, but is still pretty correct.)
If you want to install DOLT someplace other than /usr/local, you should either set the INSTALL_DIR environment variable, or edit the Makefile to set that variable.
FYI, I recently upgraded my IBM Thinkpad T22 to Mandrake Linux 9.2 which uses XFree86 Version 4.3. Evidently they broke something for the savage graphics chip driver in this distribution. I downloaded an independent driver (search Google for "thinkpad linux T22" for details). I also had to turn off hardware acceleration in order for this to work. BTW, I had no problems with my desktop PC which has an nVidia graphics card --- it just seems to be a problem with the savage S3.
This is a pretty simple library and should compile easily. Either set the INSTALL_DIR environment variable or edit the makefile. Or just copy the library and include files into the right place.
In order to compile this software, you must have the following environment variables set. Here is what you should add to your .bashrc file if you are using the CS department Suns (and are using bash as your shell):
export CGAL_MAKEFILE=/projects/cgal/CGAL-3.0/make/makefile_sparc_SunOS-5.9_g++-3.3.0 export DOLT_MAKEFILE=/projects/arl/make/Makefile-dolt
You then need to either start a new shell or "source ~/.bashrc" to make sure those environment variables are defined.
You should then be able to do the following:
$ tar xfz assign1.tgz $ cd assign1 $ gmake $ ./assign1 Problem1.txtTwo important notes:
These contain one sample problem. You should create some of your own for testing your code.
These files contain code for reading in the problem specification files and creating the workspace. They also contain the intersection code that you'll need for detemining whether a cell is empty, mixed, or full.
This is the file where you'll do most of your work. Look for "YOUR CODE HERE" in the comments.
I would suggest writing your A* code in a separate file.
This file contains the "external interface" to the motplanner.cpp file. This is simply the prototypes for the procedures that must be called from the keyboard handler in assign1.cpp
This contains the main program. You won't have to do much here except add some procedure calls to display the e-channel and m-channel. Everything else you should be able to leave as it is.