CPSC 120: Project 3

Due on Friday, 05/06/2016

Home | Calendar | Announcements | Assignments | Example Code | Notes

Emergent, Generative Art

For your last work of this semester, you are to complete a work of emergent, fractal art, drawing on the ideas in chapters 6 and 8 of Pearson's book. Exactly what you build and how you do it is up to you. However, there are a few minimum requirements for you to meet.


Minimum Requirements

  1. Your work must interact in some way with the mouse, clicks, drags, and or movement.

  2. The work must involve the display of several moving entities, enough that you need an array to manage them.

  3. The "entity" (call it whatever you want) must defined in a separate class. Exactly what you do with this class definition is again up to you, but your design should include at least the following:

  4. Your work should organize significant pieces of code into methods that you define. Definitions of setup(), draw(), keyPressed(), mousePressed(), and other, built-in event handlers are fine (and probably necessary), but they don't count here. You have to define and make use of your own.

    Points will be added or deducted, depending on how well you use this kind of abstraction to structure your program. That's a subjective measure, of course, but some guidelines apply almost everywhere:

    1. Repeated tasks should be moved into a single method definition, which is called in every place where the task eneds to be performed.
    2. Tasks that really on specific value assumptions (e.g. literal integer or color values) should become methods with parameters, which are called with the specific values passed as arguments.

Other Criteria

  1. Your work will be assessed in part on the elegance and clarity of your code, that is, the clarity an simplicity with which you accomplish complicated tasks. This is a somewhat subjective criterion, but it mainly boils down to the idea that there should be exactly as much code as you need to get a job done, neither more nor less, and what's there should be comprehensible to an independent reader.

    As a partial (but not complete list):

    1. Indentation must be proper. This will be assessed from the paper printout you turn in, so do not assume that your grader will simply fix this for you.
    2. Variables should almost always be used instead of hard-coded values, but the scope of a variable should be neither more nor less than what is needed (e.g. only make a variable global if there's no other choice).
    3. Loops should be used instead of repeating a related series of operations one at a time.
    4. Per the above requirement to use method abstractions, tasks that are repeated should be defined as methods that are called, rather than copying and pasting the same text over and over.

  2. Work whose visual presentation reflects a particularly thoughtful attention to grace, detail, and coherence of presentation will count favorably.

  3. Each file you submit must have a "header" comment of the following form:

    /*
       <file name> ( < n > of < number of files > )
       Author: <your name>
       CPSC 120 (Spring 2016), Project 3
    */
    
  4. Extra credit may be given for the incorporation of ideas you learn on your own that we have not covered in this class. Examples include effective use of the noise() function (see "Perlin noise"), manipulation of PImage values, L-systems, etc. For any such "extra", you should document clearly what idea you have learned and give a clear citation of your source (even if it is page numbers in later chapters of our textbook).


Getting Started

This project is a lot easier once you've read Chapter 6 (for the class definitions and emergent behavior) and chapter 8 (for the recursion). However, you can make significant progress right away. You can do this even though you haven't yet learned about recursion! Here are some broad ideas that might help.

Class definitions

Study the example code that was posted on April 13 and 18. This should give you a working template for your own ideas.

Making a recursive image

For now, don't try! Just implement a display() method for your entity class that does something interesting. You can go back and modify this next week to include recursion, after you've got the overall sketch working otherwise. (Though it's a weird concept, I think you'll be surprised at how easy this is.)

Emergent Behavior Rules

This is really just building an update method that checks all of the neighboring entities and uses their location (or color, or size, etc.) to update the components of this entity. For a template example, look at listings 6.4, 6.5, and 6.6 of Pearson's book (though it's best to start from 6.1, 6.2, and 6.3, in order to understand how he gets there).

You can get copies of all of the source code from this book at the book's web site, http://zenbullets.com/book.php. Indeed, Chapter 6 is also available there, as one of the samples!

The array of entity objects in your sketch will need to be globally visible, in order to be updated in the draw() method. To have it also be visible in the update method of your entity class, you have two choices:


More Ideas

The term "generative art" encompasses more than just interactive visuals constructed by computer programs, though this has become the dominant tool for making such works. Here's a general overview: http://en.wikipedia.org/wiki/Generative_art.

Generative.net (http://generative.net) has a good collection of links to various works

There's a nice (and cheap) book by Matt Pearson that you might enjoy. He keeps a website for it at http://zenbullets.com. Pearson keeps a second gallery at http://abandonedart.org. It's a bit of a time sink, as many of the works are quite mesmerizing.

There is a particularly beautiful work called "Silk", which you'll find at http://weavesilk.com


Turn In:

Submit the folder containing your Processing sketch. This should be a single folder named "project3", which will contain all source code files. Again, the turnin directory is

~lasseter/classes/cpsc120/username

PLEASE NOTE: Unlike other assignments this semester, you must turn in your own printout of your work, as this best reflects your attention to the presentation of your own work. I will test the electronic submission you make, but I'll only read the paper printout you give me. They should match exactly, of course. Please deliver these either to my mailbox (the Science office, in Eaton Hall) or to my office at Lansing 300.



John H. E. Lasseter