This is the code for Chapter 12, Figure 9 from D3.js in Action which requires a touch interface (or emulator) to see any effect. This implements panning (single touch), pinch zooming (two-finger touch), and rotation (three-finger touch) simultaneously.