MAS964: Problem Set #1
It was mentioned to me by a student that he wanted to take my class to learn java. I considered this something of an insult as the goal of this class is *not* to learn java, but to learn how to creatively explore computation as a medium.
The idea of this problem set is to bring your java skills up to a basic level in a minimal time. If you experience difficulty with these problems then I suggest that you refrain from taking this course. I cannot recommend any good reference on java because all of the ones that I have come across are not very good. One good online resource is http://www.digitalfocus.com/digitalfocus/faq/howdoi.html which is essentially a cookbook rather than a tutorial. If you want a tutorial try http://www.javasoft.com/nav/read/index.html.
0. What are your reasons for taking this course?
1. Write a java applet that reads the file located at http://acg.media.mit.edu/mas964/ps1/ps1.dat and displays the information according to the following basic rules:
- The file begins with a magic code of the two characters '%' and '!'.
- Command strings begin with a '*' followed by a ' ' (space character).
- A command string consists of a keyword (like 'text' or 'image') and can be followed by arguments.
- The first 3 args are color (r,g,b).
- In the case of image type, they are image width, height, and pixel size (essentially scale).
- Comments are prefixed with a '%' and are of course ignored by your parser.
You should build something that behaves identical to: http://acg.media.mit.edu/mas964/ps1/ps1example/example1.html.
Another test input file is at http://acg.media.mit.edu/mas964/ps1/ps1b.dat. Try it out.
2. Write a java applet that reads the file again, but this time it should do some expressive interpretation of the data. Use your imagination. Be sure to limit your solution to a purely spatial interpretation, not temporal (i.e. no animation or flying text allowed). You should be sure that your applet behaves like the example above (i.e. you can input the URL of the datafile) as during class we will load in some other test cases. Be sure to display your name somewhere on the applet so that when we look at the applet we don't have to ask who wrote it.
NOTES ON FORMAT OF URL YOU RETURN AS YOUR SOLUTION.
Come to class with a URL that points to your solution. It should be in the following format:
MAS964 Problem Set 1
Name
Date
0. I took this course not just because I wanted to learn java. Say something philosophically interesting here.
1. The following is my solution: <INSERT JAVA APPLET or URL HERE>.
Include a URL to the java source (failure to do so will disqualify your solution).
2. <INSERT JAVA APPLET or URL HERE>.
Include a URL to the java source (failure to do so will disqualify your solution).
We will browse the solutions during class time so if you are not completed.