Initial circle fitting code.