1 package eu.mihosoft.vrl.v3d.ext.quickhull3d;
11 static double[] coords =
new double[]
16 static int[][] faces =
new int[][]
25 public static void main (String[] args)
27 QuickHull3D hull =
new QuickHull3D ();
28 QuickHull3DTest tester =
new QuickHull3DTest();
30 hull =
new QuickHull3D();
32 for (
int i=0; i<100; i++)
34 double[] pnts = tester.randomCubedPoints (100, 1.0, 0.5);
36 hull.setFromQhull (pnts, pnts.length/3,
false);
38 pnts = tester.addDegeneracy (
39 QuickHull3DTest.VERTEX_DEGENERACY, pnts, hull);
42 hull.setFromQhull (pnts, pnts.length/3,
true);
44 if (!hull.check(System.out))
45 { System.out.println (
"failed for qhull triangulated");
49 hull.setFromQhull (pnts, pnts.length/3,
false);
51 if (!hull.check(System.out))
52 { System.out.println (
"failed for qhull regular");
56 hull.build (pnts, pnts.length/3);
59 if (!hull.check(System.out))
60 { System.out.println (
"failed for QuickHull3D triangulated");
64 hull.build (pnts, pnts.length/3);
66 if (!hull.check(System.out))
67 { System.out.println (
"failed for QuickHull3D regular");