Fully exploiting the Lie group that characterizes the underlying symmetry of general relativity theory, Einstein's tensor formalism factorizes, yielding a generalized (16-component) quaternion field formalism. The associated generalized geodesic equation, taken as the equation of motion of a star, predicts the Hubble law from one approximation for the generally covariant equations of motion, and the spiral structure of galaxies from another approximation. These results depend on the imposition of appropriate boundary conditions. The Hubble law follows when the boundary conditions derive from the oscillating model cosmology, and not from the other cosmological models. The spiral structures of the galaxies follow from the same boundary conditions, but with a different time scale than for the whole universe. The solutions that imply the spiral motion areFresnel integrals. These predict the star's motion to be along the “Cornu Spiral.” The part of this spiral in the first quadrant is the imploding phase of the galaxy, corresponding to a motion with continually decreasing radii, approaching the galactic center as time increases. The part of the “Cornu Spiral” in the third quadrant is the exploding phase, corresponding to continually increasing radii, as the star moves out from the hub. The spatial origin in the coordinate system of this curve is the inflection point, where the explosion changes to implosion. The two- (or many-) armed spiral galaxies are explained here in terms of two (or many) distinct explosions occurring at displaced times, in the domain of the rotating, planar galaxy.