The Nature of Code
- Spring 2008, Wednesdays 3:30 - 6:00 pm
- Daniel Shiffman, daniel.shiffman@nyu.edu
- Office Hours Signup
Important Sites
Syllabus
Week 1 -- Jan 23 -- Numbers and Vectors
- Class Intro / Overview
- Processing review
- Randomness, Probability, and Perlin Noise
- Object Oriented Programming Review & Vectors
- Assignment: Sign up for the class mailing list: join-itp-noc@lists.nyu.edu
- Assignment: Take a look at these two examples of a square randomly moving around the screen: Walker without vectors, Walker with vectors. Find an example of real-world "natural" motion (preferably in the form of an online video) and using the techniques illustrated this week in class, develop a set of rules for moving the Walker with controlled randomness. Without changing how the square looks at all (changing size or rotation is ok), can you give it a personality or make it appear to have an emotional quality? Create a second version with the same behavior, but with your own non-square design. Feel free to design an environment for the Walker to live in as well. We'll compare the versions in class next week. Can we create something natural through algorithmic behaviors alone? How much does visual design play a part? Post a link to your work, as well as any thoughts on the above, on the homework wiki.
- Reading: Computational Beauty of Nature, Introduction, Gary William Flake (you must be logged in through NYU to access the online version.)
- Reading: Probability Theory -- great friendly site!
- Introduction to Probability, Grinstead, Snell (optional) -- this is long, a lot of material, not as friendly, chapters 1-2 is probably a good goal.
- Mathematics and Physics for Programmers, Chapter 1 -- Numbers, Danny Kodicek (optional)
Week 2 -- Jan 30 -- Vectors and Forces
- Object Oriented Programming Review & Vectors
- Attraction/Repulsion
- Friction/Drag
- Reading: Newtonian Physics, An Online Textbook (This is long, you may find Chapter 4 to be particularly relevant to this week's discussion.)
- Reading: The Physics Classroom -- Newton's Laws
- Reading: Mathematics and Physics for Programmers, Chapters 12 and 14, Danny Kodicek (suggested)
- Homework (choose one / create your own) Post your work on the wiki:
- Rework your sketch from week 1 using the Vector3D class. Try incorporating forces into the environment, affecting only the acceleration of one or more objects.
- Redo the basic forces examples to have a Liquid class. Make more than one liquid object. Answer
- Research a force not covered in class and implement it as a vector.
Week 3 -- Feb 6 -- Oscillations
- Trigonometry
- Polar vs. Cartesian Coordinates
- Pendulum
- Graphing waves (perlin noise waves)
- 2D trig equation graphing ("graphing inequalities")
- Reading: Trigonometry, What is it good for? (follow along to 7 parts)
- Reading: The Mathematics of Oscillatory Motion (handed out in class)
- Reading: Mathematics and Physics for Programmers, Chapter 4, Danny Kodicek (suggested)
- Assignment: Incorporate oscillatory motion into a previous assignment (or create a new one). Some suggestions:
- Create a moving body with a shape made from oscillating parts, i.e. the object moves according to the usual vector motion, but its shape incorporates oscillation around its center point.
- Rework the wave examples to have a Wave class and visualize the wave using something other than circles.
- String together a series of pendulums so that the endpoint of one is the origin point of another.
- Create an object-oriented version of an oscillating Spring. Examples to get you started: Spring on processing.org, Springs on processing.org. Incorporate Vector3D into your class so that you Spring can respond to other forces as well.
Week 4 -- Feb 13 -- Particle Systems
- ArrayLists
- Advanced Object Oriented Programming -- Inheritance and Polymorphism
- Reading: "Particle animation and rendering using data parallel computation", Karl Sims (available via NYU network/proxy)
- Reading: "Particle Systems, a Technique for Modeling a Class of Fuzzy Objects", Reeves (available via NYU network/proxy)
- Reading: How my Dog learned Polymorphism
- Other suggested reading: Particle Systems (Siggraph), Particle System API, by David K. McAllister, Particle Systems by Allen Martin, Physically Based Modeling, Particle System Dynamics by Andrew Witkin
- Flight404's Particle example: http://www.flight404.com/blog/?p=113
- Assignment: Develop a proposal for a "midterm" project. The scope of the project can be quite large (trial idea for a final, for example), however, you will not be expected to implement the entire project, as you will only have one week. For the proposal, include a description, relevant links, and a quick Processing sketch of the first step towards the idea. Link your proposal from the wiki. Next week, you will briefly present your idea and then on Feb 27th, we will look at all of the midterm projects in class.
Week 5 -- Feb 20 -- Steering Behaviors
Week 6 -- Feb 27 -- Midterm Workshop
Week 7 -- Mar 5 -- Complex Systems
- Self-Organization Craig Reynolds' Boids -- Alignment, Cohesion, Separation
- Cellular Automata -- Wolfram CA, The Game of Life
- Reading: Chapter 15, Cellular Automata, Computational Beauty of Nature, Flake
- Reading: Conway's Game of Life, Scientific American, 1970<
- Reading: Exploring Emergence, Mitchel Resnick and Brian Silverman Epistemology and Learning Group MIT Media Laboratory
- Assignment: Choose one of the following options or create your own.
- Develop your midterm project one step further based on class feedback / discussion.
- Using the flocking example as a model, develop your own set of rules for boid interaction.
- Implement Flake's "View" rule, described in Computational Beauty of Nature
- Combine the concepts of Cellular Automata with the flocking example -- what happens if you assign each boid a "state" which influences its behavior?
- Consider the state of a cell to be its color. What types of image processing filters can you create using the principles of Cellular Automata?
- Examine the Predator/Prey System described on p. 191 of Computational Beauty of Nature. Can you use the principle of cellular automata to model and visualize it?
Week 8 -- Mar 12 -- Self-Similarity
- Fractals, MandelBrot Set
- Recursion
- L-Systems
- Reading: The Computational Beauty of Nature, Gary William Flake, Chapter 5 — Self-Similarity and Fractal Geometry, Chapter 6 — L-Systems and Fractal Growth
- Reading: Algorithmic Beauty of Plants -- suggested
Week 9 -- Mar 26 -- Genetic Algorithms
Week 10 -- Apr 2 -- Neural Networks
- The Computational Beauty of Nature, Gary William Flake, Chapter 22 -- Neural Networks and Learning
- Final Project Proposals
- Assignment: Final Project Proposals. Include in your proposal a title, brief description, and links to things you want to show / talk about -- work that inspired you, reference pages, sketches you've made, sample programs/code, previous projects, etc.
- GUEST: Rob DeSalle, http://www.amnh.org/science/divisions/invertzoo/bio.php?scientist=desalle
Week 11 -- Apr 9 -- Final Project Proposals
Week 12 -- Apr 16 -- individual meetings / workshop help
Week 13 -- Apr 23 -- Final Project Presentations
Week 14 -- Apr 30 -- Final Project Presentations
Reading Materials
Homework
Students are required to complete a programming exercise each week. Documentation for each assignment should be posted to the linked wiki page.
Requirements: (no incompletes)
- 50% homeworks
- 30% final project
- 20% class participation, attendance
|