The Nature of Code: Motion (Topics in Computation and Data)
Show Course DescriptionCan 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, self-organization, genetic algorithms, and neural networks. Examples are demonstrated in JavaScript using p5.js.
This course covers the first six chapters of Daniel Shiffman’s The Nature of Code, introducing how motion and behavior emerge from simple physical rules. Students will explore randomness, noise, vectors, forces, oscillations, autonomous agents, and particle systems—building interactive, physics-based simulations that move, react, and evolve on screen. Through hands-on coding projects in JavaScript and p5.js, students learn to translate natural forces into digital motion, bridging physics, art, and computation to create lifelike kinetic systems. The course concludes with a look ahead to the book’s later chapters, which move beyond motion into emergent complexity—offering a glimpse of how similar principles can give rise to intelligence and self-organization in digital environments.
Prerequisites: Creative Computing