Rotation algorithm segment for shape added