Open for Enrollment

You can also start immediately after joining!

Join Now

Go at your own pace

5 Sessions / 6 hours of work per session

Price

Premium membership $20/month (Preview session 1 free)

Certificate

Included w/ premium membership ($20/month)

Skill Level

Intermediate

Video Transcripts

English, Spanish; Castilian, Chinese, Portuguese

Topics

p5.js, Physics, Mathematics


Course Description

Can we capture the unpredictable evolutionary and emergent properties of nature in software? Can understanding the mathematical principles behind our physical 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 physics simulation, trigonometry, fractals, cellular automata, self-organization, and genetic algorithms. Examples are demonstrated using the p5.js environment with a focus on object oriented programming.

Video featuring original artwork in P5.js by:


Learning Outcomes

Fractals & Genetic Algorithms

  • Understanding of recursion and how it is applied in code
  • Ability to generate and design fractal patterns using code
  • Familiarity with key principles of Darwinian evolution: variation, selection, heredity
  • Understanding of formal genetic algorithm for search problems
  • Ability to apply evolution creatively in interactive, computational system

Vectors & Physics Engines

  • Familiarity with basic 2D and 3D vector math: add, subtract, scale, magnitude, normalize
  • Understanding of position, velocity, and acceleration
  • Understanding of Newton’s laws of motion: Force = Mass × Acceleration
  • Ability to apply “Euler integration” and create a simple physics engine

Steering Behaviors

  • Understanding of steering force formula
  • Ability to build an animated system where objects move around screen according to multiple rules of behavior
  • Understanding of the concept of a complex system

Schedule of Sessions

Session 1: Introduction / Overview

(June 16, 2026)

  1. Introduction
  2. What is P5.JS?
  3. Random Walker
  4. What is a Vector?
  5. Vector Math
  6. Building a Physics Engine
  7. Acceleration
  8. Accelerating Towards the Mouse (Premium Exclusive)
  9. Perlin Noise (Premium Exclusive)
  10. Assignment (Premium Exclusive)

Session 2: Vectors / Forces

(June 23, 2026)

  1. Newton's Laws of Motion (Premium Exclusive)
  2. Adding Forces (Premium Exclusive)
  3. Force Accumulation (Premium Exclusive)
  4. Adding Mass (Premium Exclusive)
  5. Gravitational Attraction (Premium Exclusive)
  6. Friction (Premium Exclusive)
  7. Arrays of Particles (Premium Exclusive)
  8. Assignment (Premium Exclusive)

Session 3: Steering Behaviors

(June 30, 2026)

  1. Steering Behaviors - Introduction (Premium Exclusive)
  2. What is an Autonomous Agent? (Premium Exclusive)
  3. Steering Force: Seek (Premium Exclusive)
  4. Arrival (Premium Exclusive)
  5. Flow Field (Premium Exclusive)
  6. Group Behavior: Separation (Premium Exclusive)
  7. Combining Behaviors: Seek and Separate (Premium Exclusive)
  8. Complex Systems: Flocking (Premium Exclusive)

Session 4: Fractals

(July 7, 2026)

  1. Introduction (Premium Exclusive)
  2. What are Fractals? (Premium Exclusive)
  3. Recursion with Functions (Premium Exclusive)
  4. Recursion with Transformation (Premium Exclusive)
  5. Recursion with Arrays of Objects (Premium Exclusive)
  6. Conclusion & Assignment (Premium Exclusive)

Session 5: Genetic Algorithms

(July 14, 2026)

  1. Evolutionary Computing (Premium Exclusive)
  2. What is a Genetic Algorithm? (Premium Exclusive)
  3. The Shakespeare Monkey Problem (Premium Exclusive)
  4. Darwinian Natural Selection (Premium Exclusive)
  5. Algorithm part 1: creating a population (Premium Exclusive)
  6. Algorithm part 2: selection (Premium Exclusive)
  7. Algorithm part 3: reproduction (Premium Exclusive)
  8. Putting it all together (Premium Exclusive)
  9. Varying the Parameters of the Genetic Algorithm (Premium Exclusive)
  10. Smart Rockets (Premium Exclusive)
  11. Interactive selection (Premium Exclusive)
  12. Ecosystem Simulation (Premium Exclusive)
  13. Conclusion (Premium Exclusive)

Instructors And Guests

Daniel Shiffman
Instructor

Daniel Shiffman works as an Associate Arts Professor at the Interactive Telecommunications Program at NYU's Tisch School of the Arts. Originally from Baltimore, Daniel received a BA in Mathematics and Philosophy from Yale University and a Master's Degree from the Interactive Telecommunications Program. As a co-founder of The Processing Foundation, he works on developing tutorials, examples, and libraries for the open source projects Processing (created by Casey Reas and Ben Fry) and p5.js (created by Lauren McCarthy). He is the author of Learning Processing: A Beginner's Guide to Programming Images, Animation, and Interaction and The Nature of Code (self-published via Kickstarter), an open source book about simulating natural phenomenon in Processing.


What You Need to Take This Course

  • Equipment: PC/Mac with installation privileges
  • Software: P5.js

Additional Information

Peer Assessment Code of Conduct: Part of what makes Kadenze a great place to learn is our community of students. While you are completing your Peer Assessments, we ask that you help us maintain the quality of our community. Please:

  • Be Polite. Show your fellow students courtesy. No one wants to feel attacked - ever. For this reason, insults, condescension, or abuse will not be tolerated.
  • Show Respect. Kadenze is a global community. Our students are from many different cultures and backgrounds. Please be patient, kind, and open-minded when discussing topics such as race, religion, gender, sexual orientation, or other potentially controversial subjects.
  • Post Appropriate Content. We believe that expression is a human right and we would never censor our students. With that in mind, please be sensitive of what you post in a Peer Assessment. Only post content where and when it is appropriate to do so.