Open For Enrollment

Would you like to enroll?

Enrollment for this course has closed. But you can enroll in a future offering (please select)

Enrollment has closed

Enrollment for this course is currently closed, but the next offering will be available shortly. Check back soon!

5 Sessions (adaptive)
Audit (Free)
Certificate (Incl. w/ Premium)
Processing Foundation
Visual Arts, Creative Computing, Computational Graphics
Skill Level
Video Transcripts
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:
Particle Equalizer #1 by Sehyun Kim
Look at me! by Muqing Niu
Dancing Spring by Yue Hu
FireWork by Yue Hu
Nature Of Code final at ITP by Joe_Mango
Nature of Code - midterm by Marcela Nowak
Sound And Motion Coding by Marcela Nowak


This course is in Adaptive mode, and is open for enrollment. Learn more about Adaptive courses here.

Session 1: Introduction / Overview
In this session we’ll review the basics of p5.js and get everyone up and running with posting sketches online. We’ll look at how object-oriented programming works in JS and create simple sketches of objects moving around a canvas.
Session 2: Vectors / Forces
This session will look at the concept of a vector and implement sketches using a p5.Vector object. By creating objects with vectors for position, velocity, and acceleration, we’ll build a simple “hello world” physics engine.
Session 3: Steering Behaviors
This session, we’ll examine a special kind of force (pioneered by Craig Reynolds) — a steering force — that moves an object according to its own goals or desires. Examples are wandering, seeking a target, path following, obstacle avoidance, and more. We’ll then look at how group behaviors can be simulated by combining multiple steering behaviors according to local interactions between objects.
Session 4: Fractals
In this session we will cover the concept of a fractal and look at ways of generating fractal patterns with code.
Session 5: Genetic Algorithms
This session will look at the key concepts of Darwinian evolution — variation, selection, heredity — and examine how they can be applied in a computer simulation.
Show off your Certificate of Accomplishment

Verify Your Achievements
Whenever you complete a course as a premium member, you can earn a verified Certificate of Accomplishment. These certificates are proof that you completed an online course on our platform.

Easily Shareable
Using its unique link, you can share your certificate with everyone from future employers and schools, to friends, family, and colleagues. It's the perfect tool to help you land that new job or promotion, apply to college, or simply share your achievements with the world.

Learning Outcomes

Below you will find an overview of the Learning Outcomes you will achieve as you complete this course.

Grading Policy
Course Great Breakdown Chart
Total: 100.00%

Plagiarism: We learn by doing our own work, and by collaborating with other students. Discussing course content and assignments with your peers is an important and helpful way to deepen your learning. However, encouraging others to copy your homework and submit it as their own is a form of cheating. So please don't post your completed assignments or correct answers to quizzes, tests, or other assessments to the discussion forums or in repositories outside of Kadenze.

Instructors & Guests
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.

Please understand that posts which violate this Code of Conduct harm our community and may be deleted or made invisible to other students by course moderators. Students who repeatedly break these rules may be removed from the course and/or may lose access to Kadenze.

Students with Disabilities: Students who have documented disabilities and who want to request accommodations should refer to the student help article via the Kadenze support center.  Kadenze is committed to making sure that our site is accessible to everyone. Configure your accessibility settings in your Kadenze Account Settings.