Algorithms for fitting circles, ellipses and conics based on the