The formation of spiral density waves has been observed in some computer simulations of the evolution of galaxies. Analysis of these computer experiments has revealed that although both "stars" and "gas" participate in the spiral structure, a greater percentage of gas participates than of stars. Experiments have been performed in which the evolution of these computer galaxies has been altered. These experiments have shown that the azimuthal gravitational forces and the azimuthal dependence of the radial forces produced by the spiral arms are necessary to maintain the density-wave structure of the galaxy. In one computer experiment a system of stars and gas that was azimuthally symmetric was given a barlike perturbation to its density. Then the evolution of this model galaxy was allowed to proceed, a two-armed spiral density wave arose spontaneously.