Chapter 7. Simulating physics

The physical world is the great teacher. A computer scientist is inclined to think of physics as the one supreme computation that has been running for billions of years. One can partially characterize the laws of physics as being (a) parallel, (b) homogeneous, and (c) local.

Regarding parallelism, the idea is that the world's computation isn't localized in some hidden controller chip, the computation is taking place everywhere at once. If you toss a rock into a pool of water, you see the ripples spread out in every direction. Each bit of water is computing the appropriate motion, and these computations add up to what we see as waves.

Homogeneity means that the same natural laws apply to all the objects in the system at every place and at every time. When objects seem to behave differently, these differences can be traced to special properties of the objects rather than to disturbances in the uniformity of physical law.

Locality expresses the notion that the state of an object or a region of the world will be updated solely on the basis of the immediately adjacent regions of the world. (What about gravity, like the pull of the Earth on the Moon? Isn't that action at a distance? Doesn't have to be. According to Einstein's General Theory of Relativity, Earth's mass warps the fabric of space-time, the warping propagates outward like a sag in a sheet, and the Moon moves in accord with the curvature of spacetime in its immediate neighborhood.) When we carry out the special types of physical simulations known as cellular automata or finite difference methods, we do implement locality. But in the case of the Pop Framework, we won't insist on locality. We'll feel free to have old-style 'actions at a distance' under which an object is attracted or repelled by an object that's nowhere near it.

In this chapter we'll focus first on implementing parallelism, and then on homogeneously applying Newton's laws of motion. That is, we allow a critter to access the positions and velocities of other critters, as if it could "see" them. Strictly speaking vision is local, by way of particle-photon interactions ? but we won't simulate down to this low a level.

    Part I: Software Engineering and Computer Games
    Part II: Software Engineering and Computer Games Reference