All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.mihosoft.vrl.v3d.ext.quickhull3d.SimpleExample Maven / Gradle / Ivy

There is a newer version: 0.5.7
Show newest version
package eu.mihosoft.vrl.v3d.ext.quickhull3d;

/**
 * Simple example usage of QuickHull3D. Run as the command
 * 
 *   java quickhull3d.SimpleExample
 * 
*/ class SimpleExample { /** * Run for a simple demonstration of QuickHull3D. */ public static void main (String[] args) { // x y z coordinates of 6 points Point3d[] points = new Point3d[] { new Point3d (0.0, 0.0, 0.0), new Point3d (1.0, 0.5, 0.0), new Point3d (2.0, 0.0, 0.0), new Point3d (0.5, 0.5, 0.5), new Point3d (0.0, 0.0, 2.0), new Point3d (0.1, 0.2, 0.3), new Point3d (0.0, 2.0, 0.0), }; QuickHull3D hull = new QuickHull3D(); hull.build (points); System.out.println ("Vertices:"); Point3d[] vertices = hull.getVertices(); for (int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy