The Nature of Code: Simulating Natural Systems with JavaScript
*The Nature of Code* by Daniel Shiffman is a beginner-friendly guide to creative coding that teaches readers how to simulate real-world phenomena using programming. Based on Shiffman’s popular work with "The Coding Train," this book bridges the gap between artistic expression and technical skill. It uses a hands-on approach to explore complex topics, making them accessible to both novice and experienced programmers. By focusing on the intersection of science, art, and technology, the text encourages readers to view code as a canvas for creativity rather than just a functional tool. This updated edition is built around JavaScript and utilizes the p5.js library to demonstrate key concepts. Readers will learn to build physics engines that simulate gravitational forces, choreograph flocking behaviors similar to birds, and generate organic structures like branching trees. The curriculum extends to advanced topics such as neural networks, cellular automata, and evolutionary algorithms, allowing users to create intelligent systems that learn and adapt. All examples are available on the book's companion website for practical application. Ultimately, this book serves as a comprehensive resource for mastering coding fundamentals while exploring the mathematical patterns found in nature. It transforms abstract scientific concepts into visually stunning digital creations, empowering readers to craft their own digital ecosystems. Whether the goal is to understand the mechanics of natural selection or simply to create mesmerizing visual art, Shiffman provides the necessary guidance to turn code into a medium for boundless discovery and innovation.
About the Authors
Daniel Shiffman
