Nature of Code

Learn to program computer simulations of natural systems

How can we capture the unpredictable evolutionary and emergent properties of nature in software? How can understanding the mathematical principles behind our physical world help us to create digital worlds? This book focuses on the programming strategies and techniques behind computer simulations of natural systems using Processing.

Daniel Shiffman is the evil genius of Processing. OK, maybe not evil, but definitely a genius. In this book, he teaches how to use particle systems and force vectors. And thats just the beginning, because there are still a couple of hundred pages left, when you reach this point. The book can be read for free on the website of bought as printed edition. And comes with lots of examples, that are easily portable into any other language (i.e. openFrameworks:
I love his videos on Youtube. Extremely interesting how breaks down natural algorithms and applies them to his coding examples.
I fell in love with Dan's work when I stumbled upon the Nature of Code website in 2012 or 2013. I had only read 5 pages of the pdf before I felt the urge the buy the printed version, which, since then has a place of choice in by bookshelf. Nature of Code stays an all time reference to me as a coder and as a teacher.