This page contains figures from the book Computational Physics by Mark Newman. Figures are given in their original resolution-independent EPS format, and for convenience in PNG image format (useful for including in presentations). All numbered figures are included here, except the three figures in Chapter 1, which cannot be distributed for copyright reasons. You can also download all figures in a single zip file by clicking here:

There are no figures in Chapters 2, 4, and 11.

Chapter 3: Graphics and visualization

EPSPNG3.1Graph of the sine function
EPSPNG3.2Graph of data from a file
EPSPNG3.3aA basic graph with extra space added
EPSPNG3.3bA graph with labeled axes
EPSPNG3.3cA graph with the curve replaced by circular dots
EPSPNG3.3dSine and cosine curves on the same graph
EPSPNG3.4The Hertzsprung--Russell diagram
EPSPNG3.5A example of a density plot
EPSPNG3.6aDensity plot using the default heat map color scheme
EPSPNG3.6bThe gray color scheme
EPSPNG3.6cThe same plot but with different calibration of the axes
EPSPNG3.6dThe same plot but with the horizontal range reduced
EPSPNG3.7Interference pattern
EPSPNG3.8Visualization of atoms in a simple cubic lattice

Chapter 5: Integrals and derivatives

EPSPNG5.1aRectangle rule
EPSPNG5.1bTrapezoidal rule
EPSPNG5.1cTrapezoidal rule with more slices
EPSPNG5.2Simpson's rule
EPSPNG5.3Doubling the number of steps in the trapezoidal rule
EPSPNG5.4aPoints and weights for Gaussian quadrature with N = 10
EPSPNG5.4bPoints and weights for Gaussian quadrature with N = 100
EPSPNG5.5Sample points for Gaussian quadrature in two dimensions
EPSPNG5.6128-point Sobol sequence
EPSPNG5.7Integration over a non-rectangular domain
EPSPNG5.8A complicated integration domain
EPSPNG5.9Forward and backward differences
EPSPNG5.10Derivative of a sampled function
EPSPNG5.11aA noisy data set
EPSPNG5.11bDerivative calculated using a forward difference
EPSPNG5.12An expanded view of the noisy data
EPSPNG5.13Smoothed data and an improved estimate of the derivative
EPSPNG5.14Linear interpolation

Chapter 6: Solution of linear and nonlinear equations

EPSPNG6.1Vibration in a chain of identical masses coupled by springs
EPSPNG6.2Magnetization as a function of temperature
EPSPNG6.3The binary search method
EPSPNG6.4An even number of roots bracketed between two points
EPSPNG6.5A function with a double root
EPSPNG6.6Newton's method
EPSPNG6.7Failure of Newton's method
EPSPNG6.8Local and global minima of a function
EPSPNG6.9Golden ratio search

Chapter 7: Fourier transforms

EPSPNG7.1Creating a periodic function from a nonperiodic one
EPSPNG7.2aSample positions for Type-I DFT
EPSPNG7.2bSample positions for Type-II DFT
EPSPNG7.3An example signal
EPSPNG7.4Fourier transform of Fig. 7.3
EPSPNG7.5Turning a nonsymmetric function into a symmetric one

Chapter 8: Ordinary differential equations

EPSPNG8.1Numerical solution of an ordinary differential equation
EPSPNG8.2Euler's method and the second-order Runge-Kutta method
EPSPNG8.3Solutions calculated with the second-order Runge-Kutta method
EPSPNG8.4Solutions calculated with the fourth-order Runge-Kutta method
EPSPNG8.5Solution of a differential equation to infinity
EPSPNG8.6Adaptive step sizes
EPSPNG8.7The adaptive step size method
EPSPNG8.8Motion of a nonlinear pendulum
EPSPNG8.9Second-order Runge-Kutta and the leapfrog method
EPSPNG8.10Total energy of the nonlinear pendulum
EPSPNG8.11The shooting method
EPSPNG8.12Solution of the Schrodinger equation in a square well

Chapter 9: Partial differential equations

EPSPNG9.1A simple electrostatics problem
EPSPNG9.2Finite differences
EPSPNG9.3Solution of the Laplace equation
EPSPNG9.4A more complicated electrostatics problem
EPSPNG9.5Solution for the electrostatic potential of Fig. 9.4
EPSPNG9.6Solution of the heat equation
EPSPNG9.7aFTCS solution of the wave equation (a)
EPSPNG9.7bFTCS solution of the wave equation (b)
EPSPNG9.7cFTCS solution of the wave equation (c)

Chapter 10: Random processes and Monte Carlo methods

EPSPNG10.1Output of the linear congruential random number generator
EPSPNG10.2Decay of a sample of radioactive atoms
EPSPNG10.3Rutherford scattering
EPSPNG10.4A pathological function
EPSPNG10.5Internal energy of an ideal gas
EPSPNG10.6The traveling salesman problem
EPSPNG10.7aSolution of a random traveling salesman problem
EPSPNG10.7bSolution of another random traveling salesman problem