Project 5
Spring 2001
Due: Dec 6 @ 5 P.M.
16 points
P2 # CREATOR: XV Version 3.10a Rev: 12/29/94 128 128 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255The first line (i.e., P2) is a magic number that identifies the pgm file type. Any line that starts with the # character is a comment, so in this image, the second line is a comment. The third line (i.e., 128 128) specifies the width and height of the image, respectively. The fourth line (i.e., 255) contains the maximum gray value. The remaining lines contain the pixel values. Don't worry about being able to read any pgm file, just worry about reading files for this project. The header will have four lines, there will be 128 x 128 black (0) and white (255) pixels. All of the images I will use to test your project will follow this format. Do not modify format of the image files. However, you may manipulate the objects in the images in any manner you see fit, subject, of course, to the laws of good taste, the United States, and People for the Ethical Treatment of Animals.
> (detect-plane "bull.pgm") NIL > (detect-plane "plane.pgm") T
If you use C or C++, then I should be able to type a.out plane.pgm or a.out bull.pgm and have the program report T or NIL to standard output.
If you use Java, then name your top-level class proj5. I should be able to type java proj5 plane.pgm or java proj5 bull.pgm and have the program report T or NIL to standard output.
;;;; ;;;; Name ;;;; E-mail Address ;;;; Platform: Windows, Linux, Solaris (cssun) ;;;; Lisp Environment: gcl, clisp, cmucl ;;;; Mail Client: mailx, pine, GUMail, Netscape, Yahoo!, etc. ;;;; ;;;; In accordance with the class policies and Georgetown's Honor Code, ;;;; I certify that, with the exceptions of the lecture notes and those ;;;; items noted below, I have neither given nor received any assistance ;;;; on this project. ;;;;When you are ready to submit your program for grading, e-mail it to me as one file with your net ID and the suffix ``.lisp'' as the subject line.
For example, if you were to submit using mailx on cssun, and if your net ID is ab123 and the name of your source file is proj1.lisp, then type at the UNIX prompt:
cssun% mailx -s "ab123.lisp" maloof@cs < proj1.lispIf you use some other mail client, then follow the same instructions, and send your code as an attachment. Submit your project before 5:00 P.M. on the due date.
Once submitted, it is important to keep an electronic copy of your project on either cssun or gusun. If we lose your project or the e-mail system breaks, then we will need to look at the modification date and time of your project to ensure that you submitted it before it was due. If you developed your code on a Windows machine, then use a secure ftp client to transfer your file to cssun or gusun.
Finally, when storing source code on university machines, it is important to set file permissions so others cannot read the file. To turn off such read/write permissions, type at the UNIX prompt chmod og-rw <file>, where <file> is the name of your source file.