A mathematical model of the ring-spinning process