Can we capture the unpredictable evolutionary and emergent properties of nature in software? Can understanding the mathematical principles behind our physical world world help us to create digital worlds? This class focuses on the programming strategies and techniques behind computer simulations of natural systems. We explore topics ranging from basic mathematics and physics concepts to more advanced simulations of complex systems. Subjects covered include forces, trigonometry, fractals, cellular automata, self-organization, and genetic algorithms. No computer programming experience is required, the course will start with the basics of code using HTML, CSS, and JavaScript (with the p5js framework). In addition to learning technical skills and discussing scientific concepts, students will have the opportunity to visit science museums, art galleries, and artist studios in the NYC area.
- Daniel Shiffman, daniel dot shiffman at nyu dot edu
- Course Number: COREA-AD 17J (Cross-listed with Interactive Media and Technology)
- Meets daily: 10am - 1pm
- Office hours daily: 2pm - 3pm (and by appointment via e-mail)
- Credit Hours 4
- Class google group for discussion / questions / announcements
- Homework wiki
- p5.js web site
- p5.js web editor
- p5.js web editor github
- Getting Started with p5 code
- All p5.js Nature of Code examples
- Museum of Math - Friday, Jan 8, 2:00 - 3:30 pm (details TBA)
- American Museum of Natural History - Monday, Jan 11, details TBA
- Second Story -- Tues, Jan 12, details TBA
- Lab at Rockwell -- Wed, Jan 13, details TBA
- New York Hall of Science - Friday, Jan 15 -- meet at the museum at 1:45pm.
- Eyebeam Art and Technology Center -- Tues, Jan 19, detials TBA
- Meets 2-4:30pm today (as to not conflict with morning orientation).
- What is computational media?
- What is programming?
- How can I apply programming to my field of interest?
- Example projects.
- What is the potential for software within the visual arts?
- As a ____________, why would I want or need to write software?
- Programming language discussion
- General discussion of programming languages
- History of creative coding frameworks
- Processing and p5.js (and what's processing.js?): What is p5.js video
- openframeworks, cinder
- max/msp dataflow programming
- How does arduino fit in?
- p5.js in the context of the browser
- Landscape of HTML, CSS, and JavaScript
- Other JS frameworks
- Server-side vs. client-side
- What is the difference between p5 and JavaScript?
- Development options -- p5.js web IDE, p5.js desktop IDE, your own local server
- Though this will be unnecessary since we are using the web IDE, you might also want to check out how to upload
- Participating in an open-source community
- What are git and github?
- When should you post to a forum vs. file a github issue?
- Who makes these things?
- Basics of blogging
- Introduction to wordpress
- Your blog is at yournetid.nyuad.im/blog. Follow the install instructions at that link (it should be fairly self explanatory). If you are stuck you can watch this video walkthrough.
- If you want to get a bit more into wordpress, you can start here.
- Supplemental Reading / Watching
- Read p. 8-41 of Form + Code
- Getting Started with p5.js: Chapters 1-3
- Videos 1.0-1.3
- Drawing
- Examples
- Drawing with numbers: video tutorial
- Shape and color functions: video tutorial
- Sol Lewitt
- Program flow (what's a function?)
- Setup, draw, and other events
- Variation: mouseX and mouseY
- video tutorial
- More about variables
- make your own variables (numbers and strings), video tutorial
- JS objects (variables inside variables), video tutorial
- random(), video tutorial
- map(), video tutorial
- Transformations
- [Reading / Homework]](https://github.com/shiffman/The-Nature-of-Code-JTerm-2016/wiki/Assignment-1)
- Conditional Statements
- Boolean expressions
- if statement
- relational operators
- video tutorial
- Case study, bouncing ball: video tutorial
- else, else if, and, or video tutorial
- buttons, rollovers, switches video tutorial
- Loops (while and for)
- while and for video tutorial
- nested loops video tutorial
- Functions
- More on randomness and perlin noise
- Intro to Objects
- Transformations
- Perlin Noise
- Modulo
- Object Oriented Programming
- Principles and Theory (Encapsulation)
- JS literal object: video tutorial
- properties - name/value pairs
- functions inside objects
this
keyword
- Object "constructor" function: video tutorial
- Clicking on objects: video tutorial
- Object intersection: video 1, video 2
- New schedule!
- Class will meet at our usual location at ITP from 10:30am - 12:00pm
- We will then reconvene at the Museum of Math for a tour from 2:00-3:30pm
- Review loops (while and for)
- while and for video tutorial
- nested loops video tutorial
- What is an array? video tutorial 6.1
- declaring, intializing
- numeric indices
- arrays and for loops: video tutorial 6.2
length
property
- An array of objects! video tutorial 6.3
- Adding and deleting from an array,
push()
andsplice()
video tutorial. 6.5, video tutorial 6.8 - Homework 4
Meet at museum at 1:45pm, tour and planetarium from 2:00-4:00pm, time to explore 4-5:45pm. Check e-mail for details.
- New schedule!
- Meet at 11am to go to Second Story for a tour starting at 12:00pm
- Regular class will be from 3-4:30pm
- Images
- There are video lessons in progress about these topics in Processing. They cover all the same content but the syntax in JavaScript is different. Videos 15.0 - 15.9
- Load and display images
- Writing pixels to screen
- Reading image pixels, image processing: brightness, threshold, etc
- Chapter 15 examples
- In class exercise: make an interactive image processing filter
- Video and sound:
- Intro to Computer Vision
- Related reading:
- Computer Vision for Artists and Designers by Golan Levin
- Learning Processing, Chapters 15-16
- Meet at 10am to go to Rockwell Labs for a tour starting at 11:00am
- Regular class will be from 2-3:30pm
- Intro to Data
- events and callbacks
- Query strings
- Web services: AJAX, JSON, and APIs
- Homework 6
- Regular class from 11am-2pm. At 1 pm we'll have lunch and presentations by ITP students.
- Vectors
- Forces
- Physics Libraries
- Additional Reading
- Computational Beauty of Nature: introduction
- Computational Beauty of Nature: Chapter 16
- There are also the Nature of Code videos.
- All examples
- Related and past projects
- Homework 7
- New schedule!
- Class will meet at our usual location at ITP from 10:00am - 11:30am
- We will then reconvene at the NY Hall of Science for a tour from 2:00-3:30pm
- Complex Systems:
- Nature of Code p5.js chapter 6 examples
- Reading:
- Craig Reynolds Steering Behavior
- Computational Beauty of Nature: Chapter 5-6, 15, 20
- Create a final project proposal
- Meet at Eyebeam Art and Technology Center at 12pm, we will have class there until ~4pm
- Final Project Proposal
- ITP Unconference Schedule
- Evolutionary Computing session at 2pm in room 50
- Introduction to Genetic Algorithms
- Also Chapter 20 in Computational Beauty of Nature
- Example code
- Workshop Schedule
- 9:30 - 11:30: breakfast and exhibiton
- Don't forget to add your documentation links!
- Assignments will include readings, programming exercises, and written documentation of your work.
- Each student will be required to post their homework to the class blog (instructions provided in class).
- Over the course of the term, you should have completed ten blog posts (8 exercises, 1 final project proposal, 1 final project summary). In total this should amount to at least 7,000 words (equivalent to 18 double-spaced pages.) Each blog post should contain a written response to material presented in class (specific questions will be provided), a description of your homework assignment, and questions regarding the technical material.
- For your final project proposal and summary, you will be required to write about your project concept and project development process.
- Students will be expected to collaborate, to document their work, to make presentations and to discuss their ideas regularly in class.
- Class time will be divided between technical lectures, independent project development, individual meetings with instructor, and project presentations / critique.
- In addition to regular class meetings, the instructor will organize a series of field trips to visit artist studios, gallery shows, and museum exhibits in the London area.
- Define the fundamentals of computation.
- Build creative software sketches that demonstrate knowledge of these fundamentals.
- Critically examine interactive art in the context of screen, sculpture, and web.
- Apply concepts from physics and mathematics to real-time software animation.
- Develop methodologies for simulating nature using computational algorithms.
- Propose and build a creative project made from computational methods.
- Class Participation (attendance, discussions, project proposal and implementation presentations) : 25%
- Writing Assignments: 25%
- Programming Assignments: 35%
- Final Project: 15%
- One liner – What did you do?
- Content – Why did you do it? Who is the audience? How does it engage with the theoretical and technical concerns we have discussed in this class?
- Demo
- Comments/Critique
- The Nature of Code, Daniel Shiffman
- The Computational Beauty of Nature, Gary Flake
- Form + Code, Casey Reas / Chandler McWilliams
- Make: Getting Started with p5.js: Making Interactive Graphics in JavaScript and Processing, Lauren McCarthy, Casey Reas, Ben Fry