Rotating parts using trigonometry

I am still looking for some explanation