If I change the texture, I'd still have to match the rotation to the markings on the texture, so I'd still need to know how the calculation works.