Fitting conic sections to scattered data