Formation of a planetary ring (SPH simulation)