@Test
public void testInfiniteLoop() {
// this test used to generate an infinite loop
List<Vector3D> list =
Arrays.asList(new Vector3D( -0.89227075512164380, -2.89317694645713900, 14.84572323743355500),
new Vector3D( -0.92099498940693580, -2.31086108263908940, 12.92071026467688300),
new Vector3D( -0.85227999411005200, -3.06314731441320730, 15.40163831651287000),
new Vector3D( -1.77399413020785970, -3.65630391378114260, 14.13190097751873400),
new Vector3D( 0.33157833272465354, -2.22813591757792160, 14.21225234159008200),
new Vector3D( -1.53065579165484400, -1.65692084770139570, 14.61483055714788500),
new Vector3D( -1.08457093941217140, -1.96100325935602980, 13.09265170575555000),
new Vector3D( 0.30029469589708850, -3.05470831395667370, 14.56352400426342600),
new Vector3D( -0.95007443938638460, -1.86810946486118360, 15.14491234340057000),
new Vector3D( -1.89661503804130830, -2.17004080885185860, 14.81235128513927000),
new Vector3D( -0.72193328761607530, -1.44513142833618270, 14.52355724218561800),
new Vector3D( -0.26895980939606550, -3.69512371522084140, 14.72272846327652000),
new Vector3D( -1.53501693431786170, -3.25055166611021900, 15.15509062584274800),
new Vector3D( -0.71727553535519410, -3.62284279460799100, 13.26256700929380700),
new Vector3D( -0.30220950676137365, -3.25410412500779070, 13.13682612771606000),
new Vector3D( -0.04543996608267075, -1.93081853923797750, 14.79497997883171400),
new Vector3D( -1.53348892951571640, -3.66688919703524900, 14.73095600812074200),
new Vector3D( -0.98034899533935820, -3.34004481162763960, 13.03245014017556800));
WelzlEncloser<Euclidean3D, Vector3D> encloser =
new WelzlEncloser<Euclidean3D, Vector3D>(1.0e-10, new SphereGenerator());
EnclosingBall<Euclidean3D, Vector3D> ball = encloser.enclose(list);
Assert.assertTrue(ball.getRadius() > 0);