public void TestFittingCircleWithRansacWhereMajorArc() { var fitting = new FittingTools(); const int takeCount = (int)(PointCount * 0.6); var circle = fitting.FittingCircleWithRansac(Points.Take(takeCount).ToArray()); Assert.Equal(circle.X, X0, 1); Assert.Equal(circle.Y, Y0, 1); Assert.Equal(circle.R, R, 1); }
public void TestFittingCircleWithRansacWhereMinorArc() { var fitting = new FittingTools(); var takeCount = (int)(PointCount * 0.1); takeCount = takeCount < 3 ? 3 : takeCount; var circle = fitting.FittingCircleWithRansac(Points.Take(takeCount).ToArray()); Assert.Equal(circle.X, X0, 0); Assert.Equal(circle.Y, Y0, 0); Assert.Equal(circle.R, R, 0); }