This is the archived website of SI 486H from the Spring 2016 semester. Feel free to browse around; you may also find more recent offerings at my teaching page.

Problem 31

Create some random art

Due: February 9
Points: 4

Write a Java, C++, or Python program to generate an image that is somehow randomly drawn and hopefully looks cool or interesting. Your images should be at a reasonable size dimension-wise so that they can be easily seen on the screen, and not so complicated that it takes more than a few seconds to run the program and generate the image. Otherwise, I leave the creative part up to you. However, I want to be a little bit restrictive on the randomness part.

Your image has to be generated randomly. Well this is kind of obvious. But it means that if I run your program multiple times, the image should look pretty different every time. This means, among other things, you need to be careful about choosing a seed value.

You must have at least two options for the type of PRNG to use, selected by command-line argument. At least one of the PRNGs you will have to write yourself (the other can be the built-in one for your programming language), with your own chosen parameters as you feel is appropriate. If your program is run without any command-line arguments, it should display a helpful help message that tells me how to indicate which PRNG to use.

You should name the resulting image file random.XXX, where XXX is the file extension of a standard image format.

The image file can be in any format you like that can be opened or used in a standard Linux environment. I recommend the PPM image format: type man ppm from Linux to find details, or read here, also this page or search for yourself. PPMs can be converted to gifs using the creatively-named ppmtogif command so that you can actually see them. The advantage of PPM is that it's simple and text-based so creating it from your program shouldn't bee too arduous.

Submit your program according to the instructions on the submit page.