Ellipsoid { public void dilate(final double da, final double db, final double dc) throws IllegalArgumentException { final double a = ra + da; final double b = rb + db; final double c = rc + dc; if (a <= 0 || b <= 0 || c <= 0) { throw new IllegalArgumentException("Ellipsoid cannot have semiaxis <= 0"); } setRadii(a, b, c); } Ellipsoid(final Object[] ellipsoid);  Ellipsoid(final double a, final double b, final double c,
		final double cx, final double cy, final double cz,
		final double[][] eigenVectors); boolean contains(final double x, final double y, final double z); void contract(final double increment); Ellipsoid copy(); void dilate(final double da, final double db, final double dc); double[] getAxisAlignedBoundingBox(); double[] getCentre(); double[] getRadii(); double[][] getRotation(); void setRotation(final double[][] rotation); double[] getSortedRadii(); double[][] getSurfacePoints(final int nPoints); double[][] getSurfacePoints(final double[][] vectors); double getVolume(); double[] getYMinAndMax(); double[] getZMinAndMax(); void rotate(final double[][] rotation); void setCentroid(final double x, final double y, final double z); static double[][] transpose(final double[][] a); public int id; }
@Test public void testDilate() { unitSphere.dilate(1); final double[][] points = unitSphere.getSurfacePoints(10000); for (final double[] p : points) { assertEquals(2, Trig.distance3D(p), 1E-9); } }