SA-2, due Apr 3

Use a set of blobs to make an animated Jackson Pollock-esque painting; i.e., random streaks/patches of moving colors. The screenshot is static, but it is being dynamically altered by a bunch of blobs.

pollock.png

Exercises

You can do this by starting with the PaintedImage from class, stripping out the input image, and using random colors instead. If you'd like, you can start with template code in which I've done the stripping-out part: Pollock.java. I'm just using wanderers and painting black everywhere, so you'll need to make them keep different random colors, and then transfer those colors to the result image.

  1. To generate a random color, call new Color(v) where v is a number between 0 and 16777216 (ask me next class where that number comes from).
  2. To be able to transfer the color for one of your blobs, you'll need to store the color in an instance variable and then retrieve it later. WanderingPixel allows you to store it, but you'll need to augment the class to allow retrieving it. Or you could use a different Blob subclass for a different style of painting (e.g., Bouncer for lines, or your SA-1 PurposefulWanderer for streaks), and then need to augment that class appropriately.
  3. Note that the Pollock class has a list of Blobs. Will your code work on any old blob? If not, change the declarations accordingly (e.g., store a list of ArrayList<WanderingPixel>, get a WanderingPixel from the list, etc.).

Submission Instructions

Turn in your completed Java code and a snapshot of a masterpiece drawn by your blobs.