The Nature of Code by Daniel Shiffman (free eBook) 12 years ago
The complete book is available as HTML with interactive Processing.js examples here: http://natureofcode.com/book/
HN user
The complete book is available as HTML with interactive Processing.js examples here: http://natureofcode.com/book/
The Nature of Code by Daniel Shiffman is a free (pay what you want) open source ebook about simulating natural systems.
The first five chapters are about physical systems like this pendulum while the remaining chapters are mostly AI related.
The book use Processing but the concepts are language agnostic: http://natureofcode.com/book/
The Early Preview of '500 Lines or Less' by AOSA: https://github.com/aosabook/500lines
The other AOSA books: http://aosabook.org/en/index.html