Rotating shapes code