t is time, i is each ribbon's index. Top formula governs top of the ribbon's rotation, bottom formula governs the bottom.