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.
Your work must interact in some way with the mouse, clicks, drags, and or movement.
The work must involve the display of several moving entities, enough that you need an array to manage them.
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:
There should be a constructor, for setting up the initial values of each entity's components
There should be a display method, which will be use to display the entity on the screen
The visual display of each entity should involve a recursive definition of your own invention. See the "Getting Started" section, below, for some useful advice on this.
There should be an update method, which you'll use to update component's of each entity, on each frame of your sketch's draw() loop.
As part of the body of this method, you should include some emergent behavior rules, which means that the way that you update an entity depends on the other entities around it. See the "Getting Started" section, below, for some useful advice on this.
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:
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):
Work whose visual presentation reflects a particularly thoughtful attention to grace, detail, and coherence of presentation will count favorably.
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 */
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).
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.
Study the example code that was posted on April 13 and 18. This should give you a working template for your own ideas.
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.)
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:
Define your class in the same source code file as your sketch. This is the approach Pearson takes. It's bad software engineering, but it may be easier to understand, at least at first.
Add a parameter to your update() method, that you can use to pass the globally-visible array. This will let you define your class in a separate file, and it's a better separation of concerns, but there aren't examples in Pearson's book that use this form.
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
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
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.