  We discuss the origin of the Tully-Fisher (TF) relation using the
$N$-body/SPH method, which includes cooling, star formation and stellar
feedback of energy, mass and metals. We consider initially rotating overdense
spheres, and trace formation processes of disk galaxies from $z=25$ to $z=0$ in
the Cold Dark Matter (CDM) cosmology. To clarify the origin of the TF relation,
we simulate formation of 14 galaxies with different masses and spin parameters,
and compute observable values, such as the total magnitude and the line-width.
We find that the simulated galaxies reproduce the slope and scatter of the TF
relation: the slope is originated in the difference of total galactic masses,
and the scatter is produced by the difference of initial spin parameters. As
well as the TF relation, observed features of spiral galaxies, such as the
exponential light-profile and the flat rotation curve, are reproduced in our
simulations, which were assumed {\it a priori} in past semi-analytical
approaches.
