  Recent developments in computer hardware and software enable researchers to
simulate the self-gravitating evolution of galaxies at a resolution comparable
to the actual number of stars. Here we present the results of a series of such
simulations. We performed $N$-body simulations of disk galaxies with between
100 and 500 million particles over a wide range of initial conditions. Our
calculations include a live bulge, disk, and dark matter halo, each of which is
represented by self-gravitating particles in the $N$-body code. The simulations
are performed using the gravitational $N$-body tree-code Bonsai running on the
Piz Daint supercomputer. We find that the time scale over which the bar forms
increases exponentially with decreasing disk-mass fraction and that the bar
formation epoch exceeds a Hubble time when the disk-mass fraction is
$\sim0.35$. These results can be explained with the swing-amplification theory.
The condition for the formation of $m=2$ spirals is consistent with that for
the formation of the bar, which is also an $m=2$ phenomenon. We further argue
that the non-barred grand-design spiral galaxies are transitional, and that
they evolve to barred galaxies on a dynamical timescale. We also confirm that
the disk-mass fraction and shear rate are important parameters for the
morphology of disk galaxies. The former affects the number of spiral arms and
the bar formation epoch, and the latter determines the pitch angle of the
spiral arms.
