square spiral circuit distance