If you still have questions you may contact the TA by e-mail.
Some image editors have an option for this purpose. But for a general solution, you can use the xwd utility. You call the program as "xwd -out image.out" and click the window you want. The program dumps the raw image of the window into the file given as the parameter. However, the image files created with the previous command are too big. It is preferred you submit your image in a format such as gif or jpeg. The following command will save the snapshot as a gif file.
xwd | xwdtopnm | ppmquant 256 | ppmtogif > image.gifGenerally 256 colors is enough but you may increase the number of colors if you want. Gif files only show 256 colors so if you want more colors use one of the following formats jpeg, bmp or xpm. You need to change the last program name in the above command according to the format you want such as ppmtojpeg, ppmtobmp or ppmtoxpm.
The input matrix file has been modified to include one extra line in
the beginning to give the coordinates of the goal position. You should not
embed the goal position into your source code because your program will be tested
with different goal positions.
Read the answer below for more details.
Yes. The format of the file has not been changed but an extra line is added
to the beginning of the file. This line is in the format "X,Y" (without the
quotes) giving the X and Y coordinates of the goal position. The current input file
part3.mtx has values "80,80" in the first line but different
values will be used during the grading. You may assume that input file will
always be named "part3.mtx" and be in the same directory as the executable.
Note that the X,Y values given will be in same units of the world. You should
convert the position of cells in the map matrix to actual coordinates in the world.
You may store all the values but just print the last, say 10 or 20, ones recorded
near the wall. There is no point to print 100 values if all of them are near 0.
You only need to concentrate on the part where the sensor values change. Instead of
a tabular output, you may also use some kind of graph to plot these values. Then,
you should not have a problem fitting the graph to the panel.
You will submit your answers in a file as described in the submission
procedure below. No hard copy is required (save the forests :)
You will create a directory structure but a little different from the
first assignment. This time, name the uppermost directory using last
four digits of your Social Security Number. If your SSN is 123-45-6789
than name the directory 6789. In this directory put a readme
file including your name, your SSN, the environment you tested your programs
(the properties of the machine and the operating system used) and any other
relevant information that is necessary to run your programs. Then create
a directory structure for each part of the assignment; namely "Part1",
"Part2" and "Part3". Each directory will have a Makefile
and a directory named "USER" containing your code for this part ("user.c",
"user.h", "user_info.c"). You can add a readme file to these directories
if there is something you want to say about that part.
The answers for the written questions will also be submitted in this directory
structure. In the uppermost directory create one file named answers.[txt|ps|pdf]
containing your answers for the written questions. No special format is required
for this file. You may just create a plain text file or use a program to create
a PostScript or PDF file. Do not forget to include any image files in your document
(or as a separate file).
After you are done, create one compressed file (using zip, tar.gzip, etc) containing
all the files in the directory structure as described above. Name the compressed
file using last four digits of your SSN. If the uppermost directory created was
named 6789 then name the compressed file 6789.tar.gz (or 6789.zip if you are using zip)
Send this one compressed file to TA's e-mail address
evren@cs.umd.edu. Make the subject line "CMSC422 Project" so that you can get a
confirmation mail when your mail is received.