This repository is a website for my forthcoming book "Exploring Physics with C++".
In folder Book you will find latest PDF (draft) version of the book.
In the folder Code you will find the source code for the programs in the book.
To try out the programs, simply clone the repository to your local machine by the method of your choosing, and open folder Code with Visual Studio Code (or Visual Studio on Windows).
Currently, only Chapter_05_pendulum is relatively complete, but there are some more programs in "initial stages" in Chapters 09, 13, and 18.
Chapters worth looking at are:
- Ch01 - Basic objects - example use of vectors, matrices, functions and geometry objects
- Ch02 - Basic algorithms - example use derivation, integration, root finding, and interpolation
- Ch05 - Simple pendulum - simple pendulum simulation
- Ch06 - Double and spherical pendulum - double and spherical pendulum simulation
- Ch08 - Gravity - investigating gravity
- Ch09 - N-body gravity problem - N-body gravity problem simulation
- Ch13 - Rigid body - calculating moments of inertia for discrete and continuous masses