This repository is a website for my forthcoming book "Exploring Physics with C++" (now in version 0.5).
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).
CollisionSimulator2D - mixing gasses in 2D
CollisionSimulator3D - Mixing gasses in 3D
Shockwave in 2D - 100 energetic particles in the middle of the box, creating a shockwave
Dependence of pressure on N (number of balls/molecules in 2D gas simulation)
Dependence of pressure on V (volume of the box in 2D gas simulation)
Gravity in 2D - examples of elliptical orbits
Gravity in 2D - examples of hyperbolical orbits
Gravity in 3D - orbits of five bodies, with one body in the center and four orbiting it
Chapters worth looking at are:
- Ch01 - Basic objects - example use of vectors, matrices, functions and geometry objects
- Ch02 - Vizualizers - example usage of visualizers
- Ch03 - Basic algorithms - example usage of derivation, integration, root finding, and interpolation algorithms
- Ch04 - Collision simulator - collision simulator in 2D and 3D
- Ch05 - Simple pendulum - solving simple pendulum
- Ch06 - Double and spherical pendulum - solving double and spherical pendulum
- 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, verifying tensor transformations