public void RansacPlaneConstructorTest2()
{
Point3[] points =
{
new Point3(1,1,1),
new Point3(2,3,4),
new Point3(4,6,9),
new Point3(2,2,3)
};
RansacPlane target = new RansacPlane(0.80, 0.9);
Plane plane = target.Estimate(points);
var normal = plane.Normal / plane.Normal.Max;
double d = plane.DistanceToPoint(Point3.Origin);
Assert.AreEqual(normal.X, 1, 1e-4);
Assert.AreEqual(normal.Y, 1, 1e-4);
Assert.AreEqual(normal.Z, -1, 1e-4);
Assert.AreEqual(plane.Offset, -d, 1e-4);
}
}