Assert.assertTrue(ball.getRadius() > 0);
}
@Test
public void testLargeSamples() throws IOException {
RandomGenerator random = new Well1024a(0x35ddecfc78131e1dl);
final UnitSphereRandomVectorGenerator sr = new UnitSphereRandomVectorGenerator(3, random);
for (int k = 0; k < 50; ++k) {
// define the reference sphere we want to compute
double d = 25 * random.nextDouble();
double refRadius = 10 * random.nextDouble();
Vector3D refCenter = new Vector3D(d, new Vector3D(sr.nextVector()));
// set up a large sample inside the reference sphere
int nbPoints = random.nextInt(1000);
List<Vector3D> points = new ArrayList<Vector3D>();
for (int i = 0; i < nbPoints; ++i) {
double r = refRadius * random.nextDouble();
points.add(new Vector3D(1.0, refCenter, r, new Vector3D(sr.nextVector())));
}
// test we find a sphere at most as large as the one used for random drawings
checkSphere(points, refRadius);