commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raydeca...@apache.org
Subject [05/11] [math] MATH-1284: Vector no longer extends Point. Replace/rename Vector?D classes with Coordinate?D classes which implement both Vector and Point. When there are multiple implementations of the same method which would confuse the compiler, prefer
Date Tue, 25 Apr 2017 22:57:01 GMT
http://git-wip-us.apache.org/repos/asf/commons-math/blob/b815d2af/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/RotationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/RotationTest.java b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/RotationTest.java
index 5f57326..a2ebce8 100644
--- a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/RotationTest.java
+++ b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/RotationTest.java
@@ -23,7 +23,7 @@ import org.apache.commons.math4.geometry.euclidean.threed.CardanEulerSingularity
 import org.apache.commons.math4.geometry.euclidean.threed.NotARotationMatrixException;
 import org.apache.commons.math4.geometry.euclidean.threed.Rotation;
 import org.apache.commons.math4.geometry.euclidean.threed.RotationOrder;
-import org.apache.commons.math4.geometry.euclidean.threed.Vector3D;
+import org.apache.commons.math4.geometry.euclidean.threed.Coordinates3D;
 import org.apache.commons.math4.util.FastMath;
 import org.apache.commons.math4.util.MathUtils;
 import org.junit.Assert;
@@ -36,21 +36,21 @@ public class RotationTest {
   public void testIdentity() {
 
     Rotation r = Rotation.IDENTITY;
-    checkVector(r.applyTo(Vector3D.PLUS_I), Vector3D.PLUS_I);
-    checkVector(r.applyTo(Vector3D.PLUS_J), Vector3D.PLUS_J);
-    checkVector(r.applyTo(Vector3D.PLUS_K), Vector3D.PLUS_K);
+    checkVector(r.applyTo(Coordinates3D.PLUS_I), Coordinates3D.PLUS_I);
+    checkVector(r.applyTo(Coordinates3D.PLUS_J), Coordinates3D.PLUS_J);
+    checkVector(r.applyTo(Coordinates3D.PLUS_K), Coordinates3D.PLUS_K);
     checkAngle(r.getAngle(), 0);
 
     r = new Rotation(-1, 0, 0, 0, false);
-    checkVector(r.applyTo(Vector3D.PLUS_I), Vector3D.PLUS_I);
-    checkVector(r.applyTo(Vector3D.PLUS_J), Vector3D.PLUS_J);
-    checkVector(r.applyTo(Vector3D.PLUS_K), Vector3D.PLUS_K);
+    checkVector(r.applyTo(Coordinates3D.PLUS_I), Coordinates3D.PLUS_I);
+    checkVector(r.applyTo(Coordinates3D.PLUS_J), Coordinates3D.PLUS_J);
+    checkVector(r.applyTo(Coordinates3D.PLUS_K), Coordinates3D.PLUS_K);
     checkAngle(r.getAngle(), 0);
 
     r = new Rotation(42, 0, 0, 0, true);
-    checkVector(r.applyTo(Vector3D.PLUS_I), Vector3D.PLUS_I);
-    checkVector(r.applyTo(Vector3D.PLUS_J), Vector3D.PLUS_J);
-    checkVector(r.applyTo(Vector3D.PLUS_K), Vector3D.PLUS_K);
+    checkVector(r.applyTo(Coordinates3D.PLUS_I), Coordinates3D.PLUS_I);
+    checkVector(r.applyTo(Coordinates3D.PLUS_J), Coordinates3D.PLUS_J);
+    checkVector(r.applyTo(Coordinates3D.PLUS_K), Coordinates3D.PLUS_K);
     checkAngle(r.getAngle(), 0);
 
   }
@@ -59,95 +59,95 @@ public class RotationTest {
   @Deprecated
   public void testAxisAngleDeprecated() throws MathIllegalArgumentException {
 
-    Rotation r = new Rotation(new Vector3D(10, 10, 10), 2 * FastMath.PI / 3);
-    checkVector(r.applyTo(Vector3D.PLUS_I), Vector3D.PLUS_J);
-    checkVector(r.applyTo(Vector3D.PLUS_J), Vector3D.PLUS_K);
-    checkVector(r.applyTo(Vector3D.PLUS_K), Vector3D.PLUS_I);
+    Rotation r = new Rotation(new Coordinates3D(10, 10, 10), 2 * FastMath.PI / 3);
+    checkVector(r.applyTo(Coordinates3D.PLUS_I), Coordinates3D.PLUS_J);
+    checkVector(r.applyTo(Coordinates3D.PLUS_J), Coordinates3D.PLUS_K);
+    checkVector(r.applyTo(Coordinates3D.PLUS_K), Coordinates3D.PLUS_I);
     double s = 1 / FastMath.sqrt(3);
-    checkVector(r.getAxis(), new Vector3D(s, s, s));
+    checkVector(r.getAxis(), new Coordinates3D(s, s, s));
     checkAngle(r.getAngle(), 2 * FastMath.PI / 3);
 
     try {
-      new Rotation(new Vector3D(0, 0, 0), 2 * FastMath.PI / 3);
+      new Rotation(new Coordinates3D(0, 0, 0), 2 * FastMath.PI / 3);
       Assert.fail("an exception should have been thrown");
     } catch (MathIllegalArgumentException e) {
     }
 
-    r = new Rotation(Vector3D.PLUS_K, 1.5 * FastMath.PI);
-    checkVector(r.getAxis(), new Vector3D(0, 0, -1));
+    r = new Rotation(Coordinates3D.PLUS_K, 1.5 * FastMath.PI);
+    checkVector(r.getAxis(), new Coordinates3D(0, 0, -1));
     checkAngle(r.getAngle(), 0.5 * FastMath.PI);
 
-    r = new Rotation(Vector3D.PLUS_J, FastMath.PI);
-    checkVector(r.getAxis(), Vector3D.PLUS_J);
+    r = new Rotation(Coordinates3D.PLUS_J, FastMath.PI);
+    checkVector(r.getAxis(), Coordinates3D.PLUS_J);
     checkAngle(r.getAngle(), FastMath.PI);
 
-    checkVector(Rotation.IDENTITY.getAxis(), Vector3D.PLUS_I);
+    checkVector(Rotation.IDENTITY.getAxis(), Coordinates3D.PLUS_I);
 
   }
 
   @Test
   public void testAxisAngleVectorOperator() throws MathIllegalArgumentException {
 
-    Rotation r = new Rotation(new Vector3D(10, 10, 10), 2 * FastMath.PI / 3, RotationConvention.VECTOR_OPERATOR);
-    checkVector(r.applyTo(Vector3D.PLUS_I), Vector3D.PLUS_J);
-    checkVector(r.applyTo(Vector3D.PLUS_J), Vector3D.PLUS_K);
-    checkVector(r.applyTo(Vector3D.PLUS_K), Vector3D.PLUS_I);
+    Rotation r = new Rotation(new Coordinates3D(10, 10, 10), 2 * FastMath.PI / 3, RotationConvention.VECTOR_OPERATOR);
+    checkVector(r.applyTo(Coordinates3D.PLUS_I), Coordinates3D.PLUS_J);
+    checkVector(r.applyTo(Coordinates3D.PLUS_J), Coordinates3D.PLUS_K);
+    checkVector(r.applyTo(Coordinates3D.PLUS_K), Coordinates3D.PLUS_I);
     double s = 1 / FastMath.sqrt(3);
-    checkVector(r.getAxis(RotationConvention.VECTOR_OPERATOR), new Vector3D( s,  s,  s));
-    checkVector(r.getAxis(RotationConvention.FRAME_TRANSFORM), new Vector3D(-s, -s, -s));
+    checkVector(r.getAxis(RotationConvention.VECTOR_OPERATOR), new Coordinates3D( s,  s,  s));
+    checkVector(r.getAxis(RotationConvention.FRAME_TRANSFORM), new Coordinates3D(-s, -s, -s));
     checkAngle(r.getAngle(), 2 * FastMath.PI / 3);
 
     try {
-      new Rotation(new Vector3D(0, 0, 0), 2 * FastMath.PI / 3, RotationConvention.VECTOR_OPERATOR);
+      new Rotation(new Coordinates3D(0, 0, 0), 2 * FastMath.PI / 3, RotationConvention.VECTOR_OPERATOR);
       Assert.fail("an exception should have been thrown");
     } catch (MathIllegalArgumentException e) {
     }
 
-    r = new Rotation(Vector3D.PLUS_K, 1.5 * FastMath.PI, RotationConvention.VECTOR_OPERATOR);
-    checkVector(r.getAxis(RotationConvention.VECTOR_OPERATOR), new Vector3D(0, 0, -1));
-    checkVector(r.getAxis(RotationConvention.FRAME_TRANSFORM), new Vector3D(0, 0, +1));
+    r = new Rotation(Coordinates3D.PLUS_K, 1.5 * FastMath.PI, RotationConvention.VECTOR_OPERATOR);
+    checkVector(r.getAxis(RotationConvention.VECTOR_OPERATOR), new Coordinates3D(0, 0, -1));
+    checkVector(r.getAxis(RotationConvention.FRAME_TRANSFORM), new Coordinates3D(0, 0, +1));
     checkAngle(r.getAngle(), 0.5 * FastMath.PI);
 
-    r = new Rotation(Vector3D.PLUS_J, FastMath.PI, RotationConvention.VECTOR_OPERATOR);
-    checkVector(r.getAxis(RotationConvention.VECTOR_OPERATOR), Vector3D.PLUS_J);
-    checkVector(r.getAxis(RotationConvention.FRAME_TRANSFORM), Vector3D.MINUS_J);
+    r = new Rotation(Coordinates3D.PLUS_J, FastMath.PI, RotationConvention.VECTOR_OPERATOR);
+    checkVector(r.getAxis(RotationConvention.VECTOR_OPERATOR), Coordinates3D.PLUS_J);
+    checkVector(r.getAxis(RotationConvention.FRAME_TRANSFORM), Coordinates3D.MINUS_J);
     checkAngle(r.getAngle(), FastMath.PI);
 
-    checkVector(Rotation.IDENTITY.getAxis(RotationConvention.VECTOR_OPERATOR), Vector3D.PLUS_I);
-    checkVector(Rotation.IDENTITY.getAxis(RotationConvention.FRAME_TRANSFORM), Vector3D.MINUS_I);
+    checkVector(Rotation.IDENTITY.getAxis(RotationConvention.VECTOR_OPERATOR), Coordinates3D.PLUS_I);
+    checkVector(Rotation.IDENTITY.getAxis(RotationConvention.FRAME_TRANSFORM), Coordinates3D.MINUS_I);
 
   }
 
   @Test
   public void testAxisAngleFrameTransform() throws MathIllegalArgumentException {
 
-    Rotation r = new Rotation(new Vector3D(10, 10, 10), 2 * FastMath.PI / 3, RotationConvention.FRAME_TRANSFORM);
-    checkVector(r.applyTo(Vector3D.PLUS_I), Vector3D.PLUS_K);
-    checkVector(r.applyTo(Vector3D.PLUS_J), Vector3D.PLUS_I);
-    checkVector(r.applyTo(Vector3D.PLUS_K), Vector3D.PLUS_J);
+    Rotation r = new Rotation(new Coordinates3D(10, 10, 10), 2 * FastMath.PI / 3, RotationConvention.FRAME_TRANSFORM);
+    checkVector(r.applyTo(Coordinates3D.PLUS_I), Coordinates3D.PLUS_K);
+    checkVector(r.applyTo(Coordinates3D.PLUS_J), Coordinates3D.PLUS_I);
+    checkVector(r.applyTo(Coordinates3D.PLUS_K), Coordinates3D.PLUS_J);
     double s = 1 / FastMath.sqrt(3);
-    checkVector(r.getAxis(RotationConvention.FRAME_TRANSFORM), new Vector3D( s,  s,  s));
-    checkVector(r.getAxis(RotationConvention.VECTOR_OPERATOR), new Vector3D(-s, -s, -s));
+    checkVector(r.getAxis(RotationConvention.FRAME_TRANSFORM), new Coordinates3D( s,  s,  s));
+    checkVector(r.getAxis(RotationConvention.VECTOR_OPERATOR), new Coordinates3D(-s, -s, -s));
     checkAngle(r.getAngle(), 2 * FastMath.PI / 3);
 
     try {
-      new Rotation(new Vector3D(0, 0, 0), 2 * FastMath.PI / 3, RotationConvention.FRAME_TRANSFORM);
+      new Rotation(new Coordinates3D(0, 0, 0), 2 * FastMath.PI / 3, RotationConvention.FRAME_TRANSFORM);
       Assert.fail("an exception should have been thrown");
     } catch (MathIllegalArgumentException e) {
     }
 
-    r = new Rotation(Vector3D.PLUS_K, 1.5 * FastMath.PI, RotationConvention.FRAME_TRANSFORM);
-    checkVector(r.getAxis(RotationConvention.FRAME_TRANSFORM), new Vector3D(0, 0, -1));
-    checkVector(r.getAxis(RotationConvention.VECTOR_OPERATOR), new Vector3D(0, 0, +1));
+    r = new Rotation(Coordinates3D.PLUS_K, 1.5 * FastMath.PI, RotationConvention.FRAME_TRANSFORM);
+    checkVector(r.getAxis(RotationConvention.FRAME_TRANSFORM), new Coordinates3D(0, 0, -1));
+    checkVector(r.getAxis(RotationConvention.VECTOR_OPERATOR), new Coordinates3D(0, 0, +1));
     checkAngle(r.getAngle(), 0.5 * FastMath.PI);
 
-    r = new Rotation(Vector3D.PLUS_J, FastMath.PI, RotationConvention.FRAME_TRANSFORM);
-    checkVector(r.getAxis(RotationConvention.FRAME_TRANSFORM), Vector3D.PLUS_J);
-    checkVector(r.getAxis(RotationConvention.VECTOR_OPERATOR), Vector3D.MINUS_J);
+    r = new Rotation(Coordinates3D.PLUS_J, FastMath.PI, RotationConvention.FRAME_TRANSFORM);
+    checkVector(r.getAxis(RotationConvention.FRAME_TRANSFORM), Coordinates3D.PLUS_J);
+    checkVector(r.getAxis(RotationConvention.VECTOR_OPERATOR), Coordinates3D.MINUS_J);
     checkAngle(r.getAngle(), FastMath.PI);
 
-    checkVector(Rotation.IDENTITY.getAxis(RotationConvention.FRAME_TRANSFORM), Vector3D.MINUS_I);
-    checkVector(Rotation.IDENTITY.getAxis(RotationConvention.VECTOR_OPERATOR), Vector3D.PLUS_I);
+    checkVector(Rotation.IDENTITY.getAxis(RotationConvention.FRAME_TRANSFORM), Coordinates3D.MINUS_I);
+    checkVector(Rotation.IDENTITY.getAxis(RotationConvention.VECTOR_OPERATOR), Coordinates3D.PLUS_I);
 
   }
 
@@ -159,7 +159,7 @@ public class RotationTest {
     checkRotation(reverted.applyTo(r), 1, 0, 0, 0);
     Assert.assertEquals(r.getAngle(), reverted.getAngle(), 1.0e-12);
     Assert.assertEquals(-1,
-                        Vector3D.dotProduct(r.getAxis(RotationConvention.VECTOR_OPERATOR),
+                        Coordinates3D.dotProduct(r.getAxis(RotationConvention.VECTOR_OPERATOR),
                                            reverted.getAxis(RotationConvention.VECTOR_OPERATOR)),
                         1.0e-12);
   }
@@ -172,7 +172,7 @@ public class RotationTest {
     checkRotation(reverted.compose(r, RotationConvention.VECTOR_OPERATOR), 1, 0, 0, 0);
     Assert.assertEquals(r.getAngle(), reverted.getAngle(), 1.0e-12);
     Assert.assertEquals(-1,
-                        Vector3D.dotProduct(r.getAxis(RotationConvention.VECTOR_OPERATOR),
+                        Coordinates3D.dotProduct(r.getAxis(RotationConvention.VECTOR_OPERATOR),
                                            reverted.getAxis(RotationConvention.VECTOR_OPERATOR)),
                         1.0e-12);
   }
@@ -185,7 +185,7 @@ public class RotationTest {
     checkRotation(reverted.compose(r, RotationConvention.FRAME_TRANSFORM), 1, 0, 0, 0);
     Assert.assertEquals(r.getAngle(), reverted.getAngle(), 1.0e-12);
     Assert.assertEquals(-1,
-                        Vector3D.dotProduct(r.getAxis(RotationConvention.FRAME_TRANSFORM),
+                        Coordinates3D.dotProduct(r.getAxis(RotationConvention.FRAME_TRANSFORM),
                                            reverted.getAxis(RotationConvention.FRAME_TRANSFORM)),
                         1.0e-12);
   }
@@ -193,15 +193,15 @@ public class RotationTest {
   @Test
   public void testVectorOnePair() throws MathArithmeticException {
 
-    Vector3D u = new Vector3D(3, 2, 1);
-    Vector3D v = new Vector3D(-4, 2, 2);
+    Coordinates3D u = new Coordinates3D(3, 2, 1);
+    Coordinates3D v = new Coordinates3D(-4, 2, 2);
     Rotation r = new Rotation(u, v);
     checkVector(r.applyTo(u.scalarMultiply(v.getNorm())), v.scalarMultiply(u.getNorm()));
 
     checkAngle(new Rotation(u, u.negate()).getAngle(), FastMath.PI);
 
     try {
-        new Rotation(u, Vector3D.ZERO);
+        new Rotation(u, Coordinates3D.ZERO);
         Assert.fail("an exception should have been thrown");
     } catch (MathArithmeticException e) {
         // expected behavior
@@ -212,36 +212,36 @@ public class RotationTest {
   @Test
   public void testVectorTwoPairs() throws MathArithmeticException {
 
-    Vector3D u1 = new Vector3D(3, 0, 0);
-    Vector3D u2 = new Vector3D(0, 5, 0);
-    Vector3D v1 = new Vector3D(0, 0, 2);
-    Vector3D v2 = new Vector3D(-2, 0, 2);
+    Coordinates3D u1 = new Coordinates3D(3, 0, 0);
+    Coordinates3D u2 = new Coordinates3D(0, 5, 0);
+    Coordinates3D v1 = new Coordinates3D(0, 0, 2);
+    Coordinates3D v2 = new Coordinates3D(-2, 0, 2);
     Rotation r = new Rotation(u1, u2, v1, v2);
-    checkVector(r.applyTo(Vector3D.PLUS_I), Vector3D.PLUS_K);
-    checkVector(r.applyTo(Vector3D.PLUS_J), Vector3D.MINUS_I);
+    checkVector(r.applyTo(Coordinates3D.PLUS_I), Coordinates3D.PLUS_K);
+    checkVector(r.applyTo(Coordinates3D.PLUS_J), Coordinates3D.MINUS_I);
 
     r = new Rotation(u1, u2, u1.negate(), u2.negate());
-    Vector3D axis = r.getAxis(RotationConvention.VECTOR_OPERATOR);
-    if (Vector3D.dotProduct(axis, Vector3D.PLUS_K) > 0) {
-      checkVector(axis, Vector3D.PLUS_K);
+    Coordinates3D axis = r.getAxis(RotationConvention.VECTOR_OPERATOR);
+    if (Coordinates3D.dotProduct(axis, Coordinates3D.PLUS_K) > 0) {
+      checkVector(axis, Coordinates3D.PLUS_K);
     } else {
-      checkVector(axis, Vector3D.MINUS_K);
+      checkVector(axis, Coordinates3D.MINUS_K);
     }
     checkAngle(r.getAngle(), FastMath.PI);
 
     double sqrt = FastMath.sqrt(2) / 2;
-    r = new Rotation(Vector3D.PLUS_I,  Vector3D.PLUS_J,
-                     new Vector3D(0.5, 0.5,  sqrt),
-                     new Vector3D(0.5, 0.5, -sqrt));
+    r = new Rotation(Coordinates3D.PLUS_I,  Coordinates3D.PLUS_J,
+                     new Coordinates3D(0.5, 0.5,  sqrt),
+                     new Coordinates3D(0.5, 0.5, -sqrt));
     checkRotation(r, sqrt, 0.5, 0.5, 0);
 
-    r = new Rotation(u1, u2, u1, Vector3D.crossProduct(u1, u2));
+    r = new Rotation(u1, u2, u1, Coordinates3D.crossProduct(u1, u2));
     checkRotation(r, sqrt, -sqrt, 0, 0);
 
     checkRotation(new Rotation(u1, u2, u1, u2), 1, 0, 0, 0);
 
     try {
-        new Rotation(u1, u2, Vector3D.ZERO, v2);
+        new Rotation(u1, u2, Coordinates3D.ZERO, v2);
         Assert.fail("an exception should have been thrown");
     } catch (MathArithmeticException e) {
       // expected behavior
@@ -317,9 +317,9 @@ public class RotationTest {
                       { 0.0, 0.0, 1.0 },
                       { 1.0, 0.0, 0.0 } };
     Rotation r = new Rotation(m1, 1.0e-7);
-    checkVector(r.applyTo(Vector3D.PLUS_I), Vector3D.PLUS_K);
-    checkVector(r.applyTo(Vector3D.PLUS_J), Vector3D.PLUS_I);
-    checkVector(r.applyTo(Vector3D.PLUS_K), Vector3D.PLUS_J);
+    checkVector(r.applyTo(Coordinates3D.PLUS_I), Coordinates3D.PLUS_K);
+    checkVector(r.applyTo(Coordinates3D.PLUS_J), Coordinates3D.PLUS_I);
+    checkVector(r.applyTo(Coordinates3D.PLUS_K), Coordinates3D.PLUS_J);
 
     double[][] m2 = { { 0.83203, -0.55012, -0.07139 },
                       { 0.48293,  0.78164, -0.39474 },
@@ -370,12 +370,12 @@ public class RotationTest {
       }
     }
 
-    checkVector(r.applyTo(Vector3D.PLUS_I),
-                new Vector3D(m3[0][0], m3[1][0], m3[2][0]));
-    checkVector(r.applyTo(Vector3D.PLUS_J),
-                new Vector3D(m3[0][1], m3[1][1], m3[2][1]));
-    checkVector(r.applyTo(Vector3D.PLUS_K),
-                new Vector3D(m3[0][2], m3[1][2], m3[2][2]));
+    checkVector(r.applyTo(Coordinates3D.PLUS_I),
+                new Coordinates3D(m3[0][0], m3[1][0], m3[2][0]));
+    checkVector(r.applyTo(Coordinates3D.PLUS_J),
+                new Coordinates3D(m3[0][1], m3[1][1], m3[2][1]));
+    checkVector(r.applyTo(Coordinates3D.PLUS_K),
+                new Coordinates3D(m3[0][2], m3[1][2], m3[2][2]));
 
     double[][] m4 = { { 1.0,  0.0,  0.0 },
                       { 0.0, -1.0,  0.0 },
@@ -535,7 +535,7 @@ public class RotationTest {
   @Test
   public void testQuaternion() throws MathIllegalArgumentException {
 
-    Rotation r1 = new Rotation(new Vector3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
+    Rotation r1 = new Rotation(new Coordinates3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
     double n = 23.5;
     Rotation r2 = new Rotation(n * r1.getQ0(), n * r1.getQ1(),
                                n * r1.getQ2(), n * r1.getQ3(),
@@ -543,7 +543,7 @@ public class RotationTest {
     for (double x = -0.9; x < 0.9; x += 0.2) {
       for (double y = -0.9; y < 0.9; y += 0.2) {
         for (double z = -0.9; z < 0.9; z += 0.2) {
-          Vector3D u = new Vector3D(x, y, z);
+          Coordinates3D u = new Coordinates3D(x, y, z);
           checkVector(r2.applyTo(u), r1.applyTo(u));
         }
       }
@@ -557,14 +557,14 @@ public class RotationTest {
   @Test
   public void testApplyTo() throws MathIllegalArgumentException {
 
-    Rotation r1 = new Rotation(new Vector3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
-    Rotation r2 = new Rotation(new Vector3D(-1, 3, 2), 0.3, RotationConvention.VECTOR_OPERATOR);
+    Rotation r1 = new Rotation(new Coordinates3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
+    Rotation r2 = new Rotation(new Coordinates3D(-1, 3, 2), 0.3, RotationConvention.VECTOR_OPERATOR);
     Rotation r3 = r2.applyTo(r1);
 
     for (double x = -0.9; x < 0.9; x += 0.2) {
       for (double y = -0.9; y < 0.9; y += 0.2) {
         for (double z = -0.9; z < 0.9; z += 0.2) {
-          Vector3D u = new Vector3D(x, y, z);
+          Coordinates3D u = new Coordinates3D(x, y, z);
           checkVector(r2.applyTo(r1.applyTo(u)), r3.applyTo(u));
         }
       }
@@ -575,14 +575,14 @@ public class RotationTest {
   @Test
   public void testComposeVectorOperator() throws MathIllegalArgumentException {
 
-    Rotation r1 = new Rotation(new Vector3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
-    Rotation r2 = new Rotation(new Vector3D(-1, 3, 2), 0.3, RotationConvention.VECTOR_OPERATOR);
+    Rotation r1 = new Rotation(new Coordinates3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
+    Rotation r2 = new Rotation(new Coordinates3D(-1, 3, 2), 0.3, RotationConvention.VECTOR_OPERATOR);
     Rotation r3 = r2.compose(r1, RotationConvention.VECTOR_OPERATOR);
 
     for (double x = -0.9; x < 0.9; x += 0.2) {
       for (double y = -0.9; y < 0.9; y += 0.2) {
         for (double z = -0.9; z < 0.9; z += 0.2) {
-          Vector3D u = new Vector3D(x, y, z);
+          Coordinates3D u = new Coordinates3D(x, y, z);
           checkVector(r2.applyTo(r1.applyTo(u)), r3.applyTo(u));
         }
       }
@@ -593,8 +593,8 @@ public class RotationTest {
   @Test
   public void testComposeFrameTransform() throws MathIllegalArgumentException {
 
-    Rotation r1 = new Rotation(new Vector3D(2, -3, 5), 1.7, RotationConvention.FRAME_TRANSFORM);
-    Rotation r2 = new Rotation(new Vector3D(-1, 3, 2), 0.3, RotationConvention.FRAME_TRANSFORM);
+    Rotation r1 = new Rotation(new Coordinates3D(2, -3, 5), 1.7, RotationConvention.FRAME_TRANSFORM);
+    Rotation r2 = new Rotation(new Coordinates3D(-1, 3, 2), 0.3, RotationConvention.FRAME_TRANSFORM);
     Rotation r3 = r2.compose(r1, RotationConvention.FRAME_TRANSFORM);
     Rotation r4 = r1.compose(r2, RotationConvention.VECTOR_OPERATOR);
     Assert.assertEquals(0.0, Rotation.distance(r3, r4), 1.0e-15);
@@ -602,7 +602,7 @@ public class RotationTest {
     for (double x = -0.9; x < 0.9; x += 0.2) {
       for (double y = -0.9; y < 0.9; y += 0.2) {
         for (double z = -0.9; z < 0.9; z += 0.2) {
-          Vector3D u = new Vector3D(x, y, z);
+          Coordinates3D u = new Coordinates3D(x, y, z);
           checkVector(r1.applyTo(r2.applyTo(u)), r3.applyTo(u));
         }
       }
@@ -613,14 +613,14 @@ public class RotationTest {
   @Test
   public void testApplyInverseToRotation() throws MathIllegalArgumentException {
 
-    Rotation r1 = new Rotation(new Vector3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
-    Rotation r2 = new Rotation(new Vector3D(-1, 3, 2), 0.3, RotationConvention.VECTOR_OPERATOR);
+    Rotation r1 = new Rotation(new Coordinates3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
+    Rotation r2 = new Rotation(new Coordinates3D(-1, 3, 2), 0.3, RotationConvention.VECTOR_OPERATOR);
     Rotation r3 = r2.applyInverseTo(r1);
 
     for (double x = -0.9; x < 0.9; x += 0.2) {
       for (double y = -0.9; y < 0.9; y += 0.2) {
         for (double z = -0.9; z < 0.9; z += 0.2) {
-          Vector3D u = new Vector3D(x, y, z);
+          Coordinates3D u = new Coordinates3D(x, y, z);
           checkVector(r2.applyInverseTo(r1.applyTo(u)), r3.applyTo(u));
         }
       }
@@ -631,14 +631,14 @@ public class RotationTest {
   @Test
   public void testComposeInverseVectorOperator() throws MathIllegalArgumentException {
 
-    Rotation r1 = new Rotation(new Vector3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
-    Rotation r2 = new Rotation(new Vector3D(-1, 3, 2), 0.3, RotationConvention.VECTOR_OPERATOR);
+    Rotation r1 = new Rotation(new Coordinates3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
+    Rotation r2 = new Rotation(new Coordinates3D(-1, 3, 2), 0.3, RotationConvention.VECTOR_OPERATOR);
     Rotation r3 = r2.composeInverse(r1, RotationConvention.VECTOR_OPERATOR);
 
     for (double x = -0.9; x < 0.9; x += 0.2) {
       for (double y = -0.9; y < 0.9; y += 0.2) {
         for (double z = -0.9; z < 0.9; z += 0.2) {
-          Vector3D u = new Vector3D(x, y, z);
+          Coordinates3D u = new Coordinates3D(x, y, z);
           checkVector(r2.applyInverseTo(r1.applyTo(u)), r3.applyTo(u));
         }
       }
@@ -649,8 +649,8 @@ public class RotationTest {
   @Test
   public void testComposeInverseFrameTransform() throws MathIllegalArgumentException {
 
-    Rotation r1 = new Rotation(new Vector3D(2, -3, 5), 1.7, RotationConvention.FRAME_TRANSFORM);
-    Rotation r2 = new Rotation(new Vector3D(-1, 3, 2), 0.3, RotationConvention.FRAME_TRANSFORM);
+    Rotation r1 = new Rotation(new Coordinates3D(2, -3, 5), 1.7, RotationConvention.FRAME_TRANSFORM);
+    Rotation r2 = new Rotation(new Coordinates3D(-1, 3, 2), 0.3, RotationConvention.FRAME_TRANSFORM);
     Rotation r3 = r2.composeInverse(r1, RotationConvention.FRAME_TRANSFORM);
     Rotation r4 = r1.revert().composeInverse(r2.revert(), RotationConvention.VECTOR_OPERATOR);
     Assert.assertEquals(0.0, Rotation.distance(r3, r4), 1.0e-15);
@@ -658,7 +658,7 @@ public class RotationTest {
     for (double x = -0.9; x < 0.9; x += 0.2) {
       for (double y = -0.9; y < 0.9; y += 0.2) {
         for (double z = -0.9; z < 0.9; z += 0.2) {
-          Vector3D u = new Vector3D(x, y, z);
+          Coordinates3D u = new Coordinates3D(x, y, z);
           checkVector(r1.applyTo(r2.applyInverseTo(u)), r3.applyTo(u));
         }
       }
@@ -669,13 +669,13 @@ public class RotationTest {
   @Test
   public void testArray() throws MathIllegalArgumentException {
 
-      Rotation r = new Rotation(new Vector3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
+      Rotation r = new Rotation(new Coordinates3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
 
       for (double x = -0.9; x < 0.9; x += 0.2) {
           for (double y = -0.9; y < 0.9; y += 0.2) {
               for (double z = -0.9; z < 0.9; z += 0.2) {
-                  Vector3D u = new Vector3D(x, y, z);
-                  Vector3D v = r.applyTo(u);
+                  Coordinates3D u = new Coordinates3D(x, y, z);
+                  Coordinates3D v = r.applyTo(u);
                   double[] inOut = new double[] { x, y, z };
                   r.applyTo(inOut, inOut);
                   Assert.assertEquals(v.getX(), inOut[0], 1.0e-10);
@@ -694,10 +694,10 @@ public class RotationTest {
   @Test
   public void testApplyInverseTo() throws MathIllegalArgumentException {
 
-    Rotation r = new Rotation(new Vector3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
+    Rotation r = new Rotation(new Coordinates3D(2, -3, 5), 1.7, RotationConvention.VECTOR_OPERATOR);
     for (double lambda = 0; lambda < 6.2; lambda += 0.2) {
       for (double phi = -1.55; phi < 1.55; phi += 0.2) {
-          Vector3D u = new Vector3D(FastMath.cos(lambda) * FastMath.cos(phi),
+          Coordinates3D u = new Coordinates3D(FastMath.cos(lambda) * FastMath.cos(phi),
                                     FastMath.sin(lambda) * FastMath.cos(phi),
                                     FastMath.sin(phi));
           r.applyInverseTo(r.applyTo(u));
@@ -709,7 +709,7 @@ public class RotationTest {
     r = Rotation.IDENTITY;
     for (double lambda = 0; lambda < 6.2; lambda += 0.2) {
       for (double phi = -1.55; phi < 1.55; phi += 0.2) {
-          Vector3D u = new Vector3D(FastMath.cos(lambda) * FastMath.cos(phi),
+          Coordinates3D u = new Coordinates3D(FastMath.cos(lambda) * FastMath.cos(phi),
                                     FastMath.sin(lambda) * FastMath.cos(phi),
                                     FastMath.sin(phi));
           checkVector(u, r.applyInverseTo(r.applyTo(u)));
@@ -717,10 +717,10 @@ public class RotationTest {
       }
     }
 
-    r = new Rotation(Vector3D.PLUS_K, FastMath.PI, RotationConvention.VECTOR_OPERATOR);
+    r = new Rotation(Coordinates3D.PLUS_K, FastMath.PI, RotationConvention.VECTOR_OPERATOR);
     for (double lambda = 0; lambda < 6.2; lambda += 0.2) {
       for (double phi = -1.55; phi < 1.55; phi += 0.2) {
-          Vector3D u = new Vector3D(FastMath.cos(lambda) * FastMath.cos(phi),
+          Coordinates3D u = new Coordinates3D(FastMath.cos(lambda) * FastMath.cos(phi),
                                     FastMath.sin(lambda) * FastMath.cos(phi),
                                     FastMath.sin(phi));
           checkVector(u, r.applyInverseTo(r.applyTo(u)));
@@ -732,13 +732,13 @@ public class RotationTest {
 
   @Test
   public void testIssue639() throws MathArithmeticException{
-      Vector3D u1 = new Vector3D(-1321008684645961.0 /  268435456.0,
+      Coordinates3D u1 = new Coordinates3D(-1321008684645961.0 /  268435456.0,
                                  -5774608829631843.0 /  268435456.0,
                                  -3822921525525679.0 / 4294967296.0);
-      Vector3D u2 =new Vector3D( -5712344449280879.0 /    2097152.0,
+      Coordinates3D u2 =new Coordinates3D( -5712344449280879.0 /    2097152.0,
                                  -2275058564560979.0 /    1048576.0,
                                   4423475992255071.0 /      65536.0);
-      Rotation rot = new Rotation(u1, u2, Vector3D.PLUS_I,Vector3D.PLUS_K);
+      Rotation rot = new Rotation(u1, u2, Coordinates3D.PLUS_I,Coordinates3D.PLUS_K);
       Assert.assertEquals( 0.6228370359608200639829222, rot.getQ0(), 1.0e-15);
       Assert.assertEquals( 0.0257707621456498790029987, rot.getQ1(), 1.0e-15);
       Assert.assertEquals(-0.0000000002503012255839931, rot.getQ2(), 1.0e-15);
@@ -747,11 +747,11 @@ public class RotationTest {
 
   @Test
   public void testIssue801() throws MathArithmeticException {
-      Vector3D u1 = new Vector3D(0.9999988431610581, -0.0015210774290851095, 0.0);
-      Vector3D u2 = new Vector3D(0.0, 0.0, 1.0);
+      Coordinates3D u1 = new Coordinates3D(0.9999988431610581, -0.0015210774290851095, 0.0);
+      Coordinates3D u2 = new Coordinates3D(0.0, 0.0, 1.0);
 
-      Vector3D v1 = new Vector3D(0.9999999999999999, 0.0, 0.0);
-      Vector3D v2 = new Vector3D(0.0, 0.0, -1.0);
+      Coordinates3D v1 = new Coordinates3D(0.9999999999999999, 0.0, 0.0);
+      Coordinates3D v2 = new Coordinates3D(0.0, 0.0, -1.0);
 
       Rotation quat = new Rotation(u1, u2, v1, v2);
       double q2 = quat.getQ0() * quat.getQ0() +
@@ -759,8 +759,8 @@ public class RotationTest {
                   quat.getQ2() * quat.getQ2() +
                   quat.getQ3() * quat.getQ3();
       Assert.assertEquals(1.0, q2, 1.0e-14);
-      Assert.assertEquals(0.0, Vector3D.angle(v1, quat.applyTo(u1)), 1.0e-14);
-      Assert.assertEquals(0.0, Vector3D.angle(v2, quat.applyTo(u2)), 1.0e-14);
+      Assert.assertEquals(0.0, Coordinates3D.angle(v1, quat.applyTo(u1)), 1.0e-14);
+      Assert.assertEquals(0.0, Coordinates3D.angle(v2, quat.applyTo(u2)), 1.0e-14);
 
   }
 
@@ -770,13 +770,13 @@ public class RotationTest {
       final double xRotation = FastMath.toDegrees(30);
       final double yRotation = FastMath.toDegrees(20);
       final double zRotation = FastMath.toDegrees(10);
-      final Vector3D startingVector = Vector3D.PLUS_I;
-      Vector3D appliedIndividually = startingVector;
+      final Coordinates3D startingVector = Coordinates3D.PLUS_I;
+      Coordinates3D appliedIndividually = startingVector;
       appliedIndividually = new Rotation(order, RotationConvention.FRAME_TRANSFORM, zRotation, 0, 0).applyTo(appliedIndividually);
       appliedIndividually = new Rotation(order, RotationConvention.FRAME_TRANSFORM, 0, yRotation, 0).applyTo(appliedIndividually);
       appliedIndividually = new Rotation(order, RotationConvention.FRAME_TRANSFORM, 0, 0, xRotation).applyTo(appliedIndividually);
 
-      final Vector3D bad = new Rotation(order, RotationConvention.FRAME_TRANSFORM, zRotation, yRotation, xRotation).applyTo(startingVector);
+      final Coordinates3D bad = new Rotation(order, RotationConvention.FRAME_TRANSFORM, zRotation, yRotation, xRotation).applyTo(startingVector);
 
       Assert.assertEquals(bad.getX(), appliedIndividually.getX(), 1e-12);
       Assert.assertEquals(bad.getY(), appliedIndividually.getY(), 1e-12);
@@ -789,8 +789,8 @@ public class RotationTest {
       final double xRotation = FastMath.toDegrees(30);
       final double yRotation = FastMath.toDegrees(20);
       final double zRotation = FastMath.toDegrees(10);
-      final Vector3D startingVector = Vector3D.PLUS_I;
-      Vector3D appliedIndividually = startingVector;
+      final Coordinates3D startingVector = Coordinates3D.PLUS_I;
+      Coordinates3D appliedIndividually = startingVector;
       appliedIndividually = new Rotation(order, RotationConvention.FRAME_TRANSFORM, zRotation, 0, 0).applyTo(appliedIndividually);
       appliedIndividually = new Rotation(order, RotationConvention.FRAME_TRANSFORM, 0, yRotation, 0).applyTo(appliedIndividually);
       appliedIndividually = new Rotation(order, RotationConvention.FRAME_TRANSFORM, 0, 0, xRotation).applyTo(appliedIndividually);
@@ -801,14 +801,14 @@ public class RotationTest {
       final Rotation composite = r1.compose(r2.compose(r3,
                                                        RotationConvention.FRAME_TRANSFORM),
                                             RotationConvention.FRAME_TRANSFORM);
-      final Vector3D good = composite.applyTo(startingVector);
+      final Coordinates3D good = composite.applyTo(startingVector);
 
       Assert.assertEquals(good.getX(), appliedIndividually.getX(), 1e-12);
       Assert.assertEquals(good.getY(), appliedIndividually.getY(), 1e-12);
       Assert.assertEquals(good.getZ(), appliedIndividually.getZ(), 1e-12);
   }
 
-  private void checkVector(Vector3D v1, Vector3D v2) {
+  private void checkVector(Coordinates3D v1, Coordinates3D v2) {
     Assert.assertTrue(v1.subtract(v2).getNorm() < 1.0e-10);
   }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/b815d2af/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SphereGeneratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SphereGeneratorTest.java b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SphereGeneratorTest.java
index 23934a3..cae331b 100644
--- a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SphereGeneratorTest.java
+++ b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SphereGeneratorTest.java
@@ -23,7 +23,7 @@ import java.util.List;
 import org.apache.commons.math4.geometry.enclosing.EnclosingBall;
 import org.apache.commons.math4.geometry.euclidean.threed.Euclidean3D;
 import org.apache.commons.math4.geometry.euclidean.threed.SphereGenerator;
-import org.apache.commons.math4.geometry.euclidean.threed.Vector3D;
+import org.apache.commons.math4.geometry.euclidean.threed.Coordinates3D;
 import org.apache.commons.math4.random.UnitSphereRandomVectorGenerator;
 import org.apache.commons.rng.UniformRandomProvider;
 import org.apache.commons.rng.simple.RandomSource;
@@ -36,8 +36,8 @@ public class SphereGeneratorTest {
 
     @Test
     public void testSupport0Point() {
-        List<Vector3D> support = Arrays.asList(new Vector3D[0]);
-        EnclosingBall<Euclidean3D, Vector3D> sphere = new SphereGenerator().ballOnSupport(support);
+        List<Coordinates3D> support = Arrays.asList(new Coordinates3D[0]);
+        EnclosingBall<Euclidean3D, Coordinates3D> sphere = new SphereGenerator().ballOnSupport(support);
         Assert.assertTrue(sphere.getRadius() < 0);
         Assert.assertEquals(0, sphere.getSupportSize());
         Assert.assertEquals(0, sphere.getSupport().length);
@@ -45,16 +45,16 @@ public class SphereGeneratorTest {
 
     @Test
     public void testSupport1Point() {
-        List<Vector3D> support = Arrays.asList(new Vector3D(1, 2, 3));
-        EnclosingBall<Euclidean3D, Vector3D> sphere = new SphereGenerator().ballOnSupport(support);
+        List<Coordinates3D> support = Arrays.asList(new Coordinates3D(1, 2, 3));
+        EnclosingBall<Euclidean3D, Coordinates3D> sphere = new SphereGenerator().ballOnSupport(support);
         Assert.assertEquals(0.0, sphere.getRadius(), 1.0e-10);
         Assert.assertTrue(sphere.contains(support.get(0)));
         Assert.assertTrue(sphere.contains(support.get(0), 0.5));
-        Assert.assertFalse(sphere.contains(new Vector3D(support.get(0).getX() + 0.1,
+        Assert.assertFalse(sphere.contains(new Coordinates3D(support.get(0).getX() + 0.1,
                                                         support.get(0).getY() + 0.1,
                                                         support.get(0).getZ() + 0.1),
                                            0.001));
-        Assert.assertTrue(sphere.contains(new Vector3D(support.get(0).getX() + 0.1,
+        Assert.assertTrue(sphere.contains(new Coordinates3D(support.get(0).getX() + 0.1,
                                                        support.get(0).getY() + 0.1,
                                                        support.get(0).getZ() + 0.1),
                                           0.5));
@@ -65,73 +65,73 @@ public class SphereGeneratorTest {
 
     @Test
     public void testSupport2Points() {
-        List<Vector3D> support = Arrays.asList(new Vector3D(1, 0, 0),
-                                               new Vector3D(3, 0, 0));
-        EnclosingBall<Euclidean3D, Vector3D> sphere = new SphereGenerator().ballOnSupport(support);
+        List<Coordinates3D> support = Arrays.asList(new Coordinates3D(1, 0, 0),
+                                               new Coordinates3D(3, 0, 0));
+        EnclosingBall<Euclidean3D, Coordinates3D> sphere = new SphereGenerator().ballOnSupport(support);
         Assert.assertEquals(1.0, sphere.getRadius(), 1.0e-10);
         int i = 0;
-        for (Vector3D v : support) {
+        for (Coordinates3D v : support) {
             Assert.assertTrue(sphere.contains(v));
             Assert.assertEquals(1.0, v.distance(sphere.getCenter()), 1.0e-10);
             Assert.assertTrue(v == sphere.getSupport()[i++]);
         }
-        Assert.assertTrue(sphere.contains(new Vector3D(2, 0.9, 0)));
-        Assert.assertFalse(sphere.contains(Vector3D.ZERO));
-        Assert.assertEquals(0.0, new Vector3D(2, 0, 0).distance(sphere.getCenter()), 1.0e-10);
+        Assert.assertTrue(sphere.contains(new Coordinates3D(2, 0.9, 0)));
+        Assert.assertFalse(sphere.contains(Coordinates3D.ZERO));
+        Assert.assertEquals(0.0, new Coordinates3D(2, 0, 0).distance(sphere.getCenter()), 1.0e-10);
         Assert.assertEquals(2, sphere.getSupportSize());
     }
 
     @Test
     public void testSupport3Points() {
-        List<Vector3D> support = Arrays.asList(new Vector3D(1, 0, 0),
-                                               new Vector3D(3, 0, 0),
-                                               new Vector3D(2, 2, 0));
-        EnclosingBall<Euclidean3D, Vector3D> sphere = new SphereGenerator().ballOnSupport(support);
+        List<Coordinates3D> support = Arrays.asList(new Coordinates3D(1, 0, 0),
+                                               new Coordinates3D(3, 0, 0),
+                                               new Coordinates3D(2, 2, 0));
+        EnclosingBall<Euclidean3D, Coordinates3D> sphere = new SphereGenerator().ballOnSupport(support);
         Assert.assertEquals(5.0 / 4.0, sphere.getRadius(), 1.0e-10);
         int i = 0;
-        for (Vector3D v : support) {
+        for (Coordinates3D v : support) {
             Assert.assertTrue(sphere.contains(v));
             Assert.assertEquals(5.0 / 4.0, v.distance(sphere.getCenter()), 1.0e-10);
             Assert.assertTrue(v == sphere.getSupport()[i++]);
         }
-        Assert.assertTrue(sphere.contains(new Vector3D(2, 0.9, 0)));
-        Assert.assertFalse(sphere.contains(new Vector3D(0.9,  0, 0)));
-        Assert.assertFalse(sphere.contains(new Vector3D(3.1,  0, 0)));
-        Assert.assertTrue(sphere.contains(new Vector3D(2.0, -0.499, 0)));
-        Assert.assertFalse(sphere.contains(new Vector3D(2.0, -0.501, 0)));
-        Assert.assertTrue(sphere.contains(new Vector3D(2.0, 3.0 / 4.0, -1.249)));
-        Assert.assertFalse(sphere.contains(new Vector3D(2.0, 3.0 / 4.0, -1.251)));
-        Assert.assertEquals(0.0, new Vector3D(2.0, 3.0 / 4.0, 0).distance(sphere.getCenter()), 1.0e-10);
+        Assert.assertTrue(sphere.contains(new Coordinates3D(2, 0.9, 0)));
+        Assert.assertFalse(sphere.contains(new Coordinates3D(0.9,  0, 0)));
+        Assert.assertFalse(sphere.contains(new Coordinates3D(3.1,  0, 0)));
+        Assert.assertTrue(sphere.contains(new Coordinates3D(2.0, -0.499, 0)));
+        Assert.assertFalse(sphere.contains(new Coordinates3D(2.0, -0.501, 0)));
+        Assert.assertTrue(sphere.contains(new Coordinates3D(2.0, 3.0 / 4.0, -1.249)));
+        Assert.assertFalse(sphere.contains(new Coordinates3D(2.0, 3.0 / 4.0, -1.251)));
+        Assert.assertEquals(0.0, new Coordinates3D(2.0, 3.0 / 4.0, 0).distance(sphere.getCenter()), 1.0e-10);
         Assert.assertEquals(3, sphere.getSupportSize());
     }
 
     @Test
     public void testSupport4Points() {
-        List<Vector3D> support = Arrays.asList(new Vector3D(17, 14,  18),
-                                               new Vector3D(11, 14,  22),
-                                               new Vector3D( 2, 22,  17),
-                                               new Vector3D(22, 11, -10));
-        EnclosingBall<Euclidean3D, Vector3D> sphere = new SphereGenerator().ballOnSupport(support);
+        List<Coordinates3D> support = Arrays.asList(new Coordinates3D(17, 14,  18),
+                                               new Coordinates3D(11, 14,  22),
+                                               new Coordinates3D( 2, 22,  17),
+                                               new Coordinates3D(22, 11, -10));
+        EnclosingBall<Euclidean3D, Coordinates3D> sphere = new SphereGenerator().ballOnSupport(support);
         Assert.assertEquals(25.0, sphere.getRadius(), 1.0e-10);
         int i = 0;
-        for (Vector3D v : support) {
+        for (Coordinates3D v : support) {
             Assert.assertTrue(sphere.contains(v));
             Assert.assertEquals(25.0, v.distance(sphere.getCenter()), 1.0e-10);
             Assert.assertTrue(v == sphere.getSupport()[i++]);
         }
-        Assert.assertTrue(sphere.contains (new Vector3D(-22.999, 2, 2)));
-        Assert.assertFalse(sphere.contains(new Vector3D(-23.001, 2, 2)));
-        Assert.assertTrue(sphere.contains (new Vector3D( 26.999, 2, 2)));
-        Assert.assertFalse(sphere.contains(new Vector3D( 27.001, 2, 2)));
-        Assert.assertTrue(sphere.contains (new Vector3D(2, -22.999, 2)));
-        Assert.assertFalse(sphere.contains(new Vector3D(2, -23.001, 2)));
-        Assert.assertTrue(sphere.contains (new Vector3D(2,  26.999, 2)));
-        Assert.assertFalse(sphere.contains(new Vector3D(2,  27.001, 2)));
-        Assert.assertTrue(sphere.contains (new Vector3D(2, 2, -22.999)));
-        Assert.assertFalse(sphere.contains(new Vector3D(2, 2, -23.001)));
-        Assert.assertTrue(sphere.contains (new Vector3D(2, 2,  26.999)));
-        Assert.assertFalse(sphere.contains(new Vector3D(2, 2,  27.001)));
-        Assert.assertEquals(0.0, new Vector3D(2.0, 2.0, 2.0).distance(sphere.getCenter()), 1.0e-10);
+        Assert.assertTrue(sphere.contains (new Coordinates3D(-22.999, 2, 2)));
+        Assert.assertFalse(sphere.contains(new Coordinates3D(-23.001, 2, 2)));
+        Assert.assertTrue(sphere.contains (new Coordinates3D( 26.999, 2, 2)));
+        Assert.assertFalse(sphere.contains(new Coordinates3D( 27.001, 2, 2)));
+        Assert.assertTrue(sphere.contains (new Coordinates3D(2, -22.999, 2)));
+        Assert.assertFalse(sphere.contains(new Coordinates3D(2, -23.001, 2)));
+        Assert.assertTrue(sphere.contains (new Coordinates3D(2,  26.999, 2)));
+        Assert.assertFalse(sphere.contains(new Coordinates3D(2,  27.001, 2)));
+        Assert.assertTrue(sphere.contains (new Coordinates3D(2, 2, -22.999)));
+        Assert.assertFalse(sphere.contains(new Coordinates3D(2, 2, -23.001)));
+        Assert.assertTrue(sphere.contains (new Coordinates3D(2, 2,  26.999)));
+        Assert.assertFalse(sphere.contains(new Coordinates3D(2, 2,  27.001)));
+        Assert.assertEquals(0.0, new Coordinates3D(2.0, 2.0, 2.0).distance(sphere.getCenter()), 1.0e-10);
         Assert.assertEquals(4, sphere.getSupportSize());
     }
 
@@ -143,12 +143,12 @@ public class SphereGeneratorTest {
         for (int i = 0; i < 100; ++i) {
             double d = 25 * random.nextDouble();
             double refRadius = 10 * random.nextDouble();
-            Vector3D refCenter = new Vector3D(d, new Vector3D(sr.nextVector()));
-            List<Vector3D> support = new ArrayList<>();
+            Coordinates3D refCenter = new Coordinates3D(d, new Coordinates3D(sr.nextVector()));
+            List<Coordinates3D> support = new ArrayList<>();
             for (int j = 0; j < 5; ++j) {
-                support.add(new Vector3D(1.0, refCenter, refRadius, new Vector3D(sr.nextVector())));
+                support.add(new Coordinates3D(1.0, refCenter, refRadius, new Coordinates3D(sr.nextVector())));
             }
-            EnclosingBall<Euclidean3D, Vector3D> sphere = new SphereGenerator().ballOnSupport(support);
+            EnclosingBall<Euclidean3D, Coordinates3D> sphere = new SphereGenerator().ballOnSupport(support);
             Assert.assertEquals(0.0, refCenter.distance(sphere.getCenter()), 4e-7 * refRadius);
             Assert.assertEquals(refRadius, sphere.getRadius(), 1e-7 * refRadius);
         }
@@ -156,20 +156,20 @@ public class SphereGeneratorTest {
 
     @Test
     public void testDegeneratedCase() {
-       final List<Vector3D> support =
-               Arrays.asList(new Vector3D(FastMath.scalb(-8039905610797991.0, -50),   //   -7.140870659936730
+       final List<Coordinates3D> support =
+               Arrays.asList(new Coordinates3D(FastMath.scalb(-8039905610797991.0, -50),   //   -7.140870659936730
                                           FastMath.scalb(-4663475464714142.0, -48),   //  -16.567993074240455
                                           FastMath.scalb( 6592658872616184.0, -49)),  //   11.710914678204503
-                             new Vector3D(FastMath.scalb(-8036658568968473.0, -50),   //   -7.137986707455888
+                             new Coordinates3D(FastMath.scalb(-8036658568968473.0, -50),   //   -7.137986707455888
                                           FastMath.scalb(-4664256346424880.0, -48),   //  -16.570767323375720
                                           FastMath.scalb( 6591357011730307.0, -49)),  //  11.708602108715928)
-                             new Vector3D(FastMath.scalb(-8037820142977230.0, -50),   //   -7.139018392423351
+                             new Coordinates3D(FastMath.scalb(-8037820142977230.0, -50),   //   -7.139018392423351
                                           FastMath.scalb(-4665280434237813.0, -48),   //  -16.574405614157020
                                           FastMath.scalb( 6592435966112099.0, -49)),  //   11.710518716711425
-                             new Vector3D(FastMath.scalb(-8038007803611611.0, -50),   //   -7.139185068549035
+                             new Coordinates3D(FastMath.scalb(-8038007803611611.0, -50),   //   -7.139185068549035
                                           FastMath.scalb(-4664291215918380.0, -48),   //  -16.570891204702250
                                           FastMath.scalb( 6595270610894208.0, -49))); //   11.715554057357394
-        EnclosingBall<Euclidean3D, Vector3D> sphere = new SphereGenerator().ballOnSupport(support);
+        EnclosingBall<Euclidean3D, Coordinates3D> sphere = new SphereGenerator().ballOnSupport(support);
 
         // the following values have been computed using Emacs calc with exact arithmetic from the
         // rational representation corresponding to the scalb calls (i.e. -8039905610797991/2^50, ...)
@@ -180,7 +180,7 @@ public class SphereGeneratorTest {
         Assert.assertEquals(-16.571096474251747245361467833760, sphere.getCenter().getY(), 1.0e-20);
         Assert.assertEquals( 11.711945804096960876521111630800, sphere.getCenter().getZ(), 1.0e-20);
 
-        for (Vector3D v : support) {
+        for (Coordinates3D v : support) {
             Assert.assertTrue(sphere.contains(v, 1.0e-14));
         }
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/b815d2af/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SphericalCoordinatesTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SphericalCoordinatesTest.java b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SphericalCoordinatesTest.java
index 48e5fca..36c9ed4 100644
--- a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SphericalCoordinatesTest.java
+++ b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SphericalCoordinatesTest.java
@@ -21,7 +21,7 @@ import org.apache.commons.math4.TestUtils;
 import org.apache.commons.math4.analysis.differentiation.DerivativeStructure;
 import org.apache.commons.math4.exception.DimensionMismatchException;
 import org.apache.commons.math4.geometry.euclidean.threed.SphericalCoordinates;
-import org.apache.commons.math4.geometry.euclidean.threed.Vector3D;
+import org.apache.commons.math4.geometry.euclidean.threed.Coordinates3D;
 import org.apache.commons.math4.util.FastMath;
 import org.junit.Assert;
 import org.junit.Test;
@@ -32,43 +32,43 @@ public class SphericalCoordinatesTest {
     public void testCoordinatesStoC() throws DimensionMismatchException {
         double piO2 = 0.5 * FastMath.PI;
         SphericalCoordinates sc1 = new SphericalCoordinates(2.0, 0, piO2);
-        Assert.assertEquals(0, sc1.getCartesian().distance(new Vector3D(2, 0, 0)), 1.0e-10);
+        Assert.assertEquals(0, sc1.getCartesian().distance(new Coordinates3D(2, 0, 0)), 1.0e-10);
         SphericalCoordinates sc2 = new SphericalCoordinates(2.0, piO2, piO2);
-        Assert.assertEquals(0, sc2.getCartesian().distance(new Vector3D(0, 2, 0)), 1.0e-10);
+        Assert.assertEquals(0, sc2.getCartesian().distance(new Coordinates3D(0, 2, 0)), 1.0e-10);
         SphericalCoordinates sc3 = new SphericalCoordinates(2.0, FastMath.PI, piO2);
-        Assert.assertEquals(0, sc3.getCartesian().distance(new Vector3D(-2, 0, 0)), 1.0e-10);
+        Assert.assertEquals(0, sc3.getCartesian().distance(new Coordinates3D(-2, 0, 0)), 1.0e-10);
         SphericalCoordinates sc4 = new SphericalCoordinates(2.0, -piO2, piO2);
-        Assert.assertEquals(0, sc4.getCartesian().distance(new Vector3D(0, -2, 0)), 1.0e-10);
+        Assert.assertEquals(0, sc4.getCartesian().distance(new Coordinates3D(0, -2, 0)), 1.0e-10);
         SphericalCoordinates sc5 = new SphericalCoordinates(2.0, 1.23456, 0);
-        Assert.assertEquals(0, sc5.getCartesian().distance(new Vector3D(0, 0, 2)), 1.0e-10);
+        Assert.assertEquals(0, sc5.getCartesian().distance(new Coordinates3D(0, 0, 2)), 1.0e-10);
         SphericalCoordinates sc6 = new SphericalCoordinates(2.0, 6.54321, FastMath.PI);
-        Assert.assertEquals(0, sc6.getCartesian().distance(new Vector3D(0, 0, -2)), 1.0e-10);
+        Assert.assertEquals(0, sc6.getCartesian().distance(new Coordinates3D(0, 0, -2)), 1.0e-10);
     }
 
     @Test
     public void testCoordinatesCtoS() throws DimensionMismatchException {
         double piO2 = 0.5 * FastMath.PI;
-        SphericalCoordinates sc1 = new SphericalCoordinates(new Vector3D(2, 0, 0));
+        SphericalCoordinates sc1 = new SphericalCoordinates(new Coordinates3D(2, 0, 0));
         Assert.assertEquals(2,           sc1.getR(),     1.0e-10);
         Assert.assertEquals(0,           sc1.getTheta(), 1.0e-10);
         Assert.assertEquals(piO2,        sc1.getPhi(),   1.0e-10);
-        SphericalCoordinates sc2 = new SphericalCoordinates(new Vector3D(0, 2, 0));
+        SphericalCoordinates sc2 = new SphericalCoordinates(new Coordinates3D(0, 2, 0));
         Assert.assertEquals(2,           sc2.getR(),     1.0e-10);
         Assert.assertEquals(piO2,        sc2.getTheta(), 1.0e-10);
         Assert.assertEquals(piO2,        sc2.getPhi(),   1.0e-10);
-        SphericalCoordinates sc3 = new SphericalCoordinates(new Vector3D(-2, 0, 0));
+        SphericalCoordinates sc3 = new SphericalCoordinates(new Coordinates3D(-2, 0, 0));
         Assert.assertEquals(2,           sc3.getR(),     1.0e-10);
         Assert.assertEquals(FastMath.PI, sc3.getTheta(), 1.0e-10);
         Assert.assertEquals(piO2,        sc3.getPhi(),   1.0e-10);
-        SphericalCoordinates sc4 = new SphericalCoordinates(new Vector3D(0, -2, 0));
+        SphericalCoordinates sc4 = new SphericalCoordinates(new Coordinates3D(0, -2, 0));
         Assert.assertEquals(2,           sc4.getR(),     1.0e-10);
         Assert.assertEquals(-piO2,       sc4.getTheta(), 1.0e-10);
         Assert.assertEquals(piO2,        sc4.getPhi(),   1.0e-10);
-        SphericalCoordinates sc5 = new SphericalCoordinates(new Vector3D(0, 0, 2));
+        SphericalCoordinates sc5 = new SphericalCoordinates(new Coordinates3D(0, 0, 2));
         Assert.assertEquals(2,           sc5.getR(),     1.0e-10);
         //  don't check theta on poles, as it is singular
         Assert.assertEquals(0,           sc5.getPhi(),   1.0e-10);
-        SphericalCoordinates sc6 = new SphericalCoordinates(new Vector3D(0, 0, -2));
+        SphericalCoordinates sc6 = new SphericalCoordinates(new Coordinates3D(0, 0, -2));
         Assert.assertEquals(2,           sc6.getR(),     1.0e-10);
         //  don't check theta on poles, as it is singular
         Assert.assertEquals(FastMath.PI, sc6.getPhi(),   1.0e-10);
@@ -93,11 +93,11 @@ public class SphericalCoordinatesTest {
                     DerivativeStructure cvalue = valueCartesian(new DerivativeStructure(3, 1, 0, sc.getCartesian().getX()),
                                                                 new DerivativeStructure(3, 1, 1, sc.getCartesian().getY()),
                                                                 new DerivativeStructure(3, 1, 2, sc.getCartesian().getZ()));
-                    Vector3D refCGradient = new Vector3D(cvalue.getPartialDerivative(1, 0, 0),
+                    Coordinates3D refCGradient = new Coordinates3D(cvalue.getPartialDerivative(1, 0, 0),
                                                          cvalue.getPartialDerivative(0, 1, 0),
                                                          cvalue.getPartialDerivative(0, 0, 1));
 
-                    Vector3D testCGradient = new Vector3D(sc.toCartesianGradient(sGradient));
+                    Coordinates3D testCGradient = new Coordinates3D(sc.toCartesianGradient(sGradient));
 
                     Assert.assertEquals(0, testCGradient.distance(refCGradient) / refCGradient.getNorm(), 5.0e-14);
 

http://git-wip-us.apache.org/repos/asf/commons-math/blob/b815d2af/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SubLineTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SubLineTest.java b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SubLineTest.java
index 2c2b17d..cb967fb 100644
--- a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SubLineTest.java
+++ b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/SubLineTest.java
@@ -24,7 +24,7 @@ import org.apache.commons.math4.geometry.euclidean.oned.IntervalsSet;
 import org.apache.commons.math4.geometry.euclidean.threed.Line;
 import org.apache.commons.math4.geometry.euclidean.threed.Segment;
 import org.apache.commons.math4.geometry.euclidean.threed.SubLine;
-import org.apache.commons.math4.geometry.euclidean.threed.Vector3D;
+import org.apache.commons.math4.geometry.euclidean.threed.Coordinates3D;
 import org.apache.commons.math4.geometry.partitioning.RegionFactory;
 import org.junit.Assert;
 import org.junit.Test;
@@ -33,19 +33,19 @@ public class SubLineTest {
 
     @Test
     public void testEndPoints() throws MathIllegalArgumentException {
-        Vector3D p1 = new Vector3D(-1, -7, 2);
-        Vector3D p2 = new Vector3D(7, -1, 0);
+        Coordinates3D p1 = new Coordinates3D(-1, -7, 2);
+        Coordinates3D p2 = new Coordinates3D(7, -1, 0);
         Segment segment = new Segment(p1, p2, new Line(p1, p2, 1.0e-10));
         SubLine sub = new SubLine(segment);
         List<Segment> segments = sub.getSegments();
         Assert.assertEquals(1, segments.size());
-        Assert.assertEquals(0.0, new Vector3D(-1, -7, 2).distance(segments.get(0).getStart()), 1.0e-10);
-        Assert.assertEquals(0.0, new Vector3D( 7, -1, 0).distance(segments.get(0).getEnd()), 1.0e-10);
+        Assert.assertEquals(0.0, new Coordinates3D(-1, -7, 2).distance(segments.get(0).getStart()), 1.0e-10);
+        Assert.assertEquals(0.0, new Coordinates3D( 7, -1, 0).distance(segments.get(0).getEnd()), 1.0e-10);
     }
 
     @Test
     public void testNoEndPoints() throws MathIllegalArgumentException {
-        SubLine wholeLine = new Line(new Vector3D(-1, 7, 2), new Vector3D(7, 1, 0), 1.0e-10).wholeLine();
+        SubLine wholeLine = new Line(new Coordinates3D(-1, 7, 2), new Coordinates3D(7, 1, 0), 1.0e-10).wholeLine();
         List<Segment> segments = wholeLine.getSegments();
         Assert.assertEquals(1, segments.size());
         Assert.assertTrue(Double.isInfinite(segments.get(0).getStart().getX()) &&
@@ -64,7 +64,7 @@ public class SubLineTest {
 
     @Test
     public void testNoSegments() throws MathIllegalArgumentException {
-        SubLine empty = new SubLine(new Line(new Vector3D(-1, -7, 2), new Vector3D(7, -1, 0), 1.0e-10),
+        SubLine empty = new SubLine(new Line(new Coordinates3D(-1, -7, 2), new Coordinates3D(7, -1, 0), 1.0e-10),
                                     (IntervalsSet) new RegionFactory<Euclidean1D>().getComplement(new IntervalsSet(1.0e-10)));
         List<Segment> segments = empty.getSegments();
         Assert.assertEquals(0, segments.size());
@@ -72,7 +72,7 @@ public class SubLineTest {
 
     @Test
     public void testSeveralSegments() throws MathIllegalArgumentException {
-        SubLine twoSubs = new SubLine(new Line(new Vector3D(-1, -7, 2), new Vector3D(7, -1, 0), 1.0e-10),
+        SubLine twoSubs = new SubLine(new Line(new Coordinates3D(-1, -7, 2), new Coordinates3D(7, -1, 0), 1.0e-10),
                                       (IntervalsSet) new RegionFactory<Euclidean1D>().union(new IntervalsSet(1, 2, 1.0e-10),
                                                                                             new IntervalsSet(3, 4, 1.0e-10)));
         List<Segment> segments = twoSubs.getSegments();
@@ -81,7 +81,7 @@ public class SubLineTest {
 
     @Test
     public void testHalfInfiniteNeg() throws MathIllegalArgumentException {
-        SubLine empty = new SubLine(new Line(new Vector3D(-1, -7, 2), new Vector3D(7, -1, -2), 1.0e-10),
+        SubLine empty = new SubLine(new Line(new Coordinates3D(-1, -7, 2), new Coordinates3D(7, -1, -2), 1.0e-10),
                                     new IntervalsSet(Double.NEGATIVE_INFINITY, 0.0, 1.0e-10));
         List<Segment> segments = empty.getSegments();
         Assert.assertEquals(1, segments.size());
@@ -91,16 +91,16 @@ public class SubLineTest {
                           segments.get(0).getStart().getY() < 0);
         Assert.assertTrue(Double.isInfinite(segments.get(0).getStart().getZ()) &&
                           segments.get(0).getStart().getZ() > 0);
-        Assert.assertEquals(0.0, new Vector3D(3, -4, 0).distance(segments.get(0).getEnd()), 1.0e-10);
+        Assert.assertEquals(0.0, new Coordinates3D(3, -4, 0).distance(segments.get(0).getEnd()), 1.0e-10);
     }
 
     @Test
     public void testHalfInfinitePos() throws MathIllegalArgumentException {
-        SubLine empty = new SubLine(new Line(new Vector3D(-1, -7, 2), new Vector3D(7, -1, -2), 1.0e-10),
+        SubLine empty = new SubLine(new Line(new Coordinates3D(-1, -7, 2), new Coordinates3D(7, -1, -2), 1.0e-10),
                                     new IntervalsSet(0.0, Double.POSITIVE_INFINITY, 1.0e-10));
         List<Segment> segments = empty.getSegments();
         Assert.assertEquals(1, segments.size());
-        Assert.assertEquals(0.0, new Vector3D(3, -4, 0).distance(segments.get(0).getStart()), 1.0e-10);
+        Assert.assertEquals(0.0, new Coordinates3D(3, -4, 0).distance(segments.get(0).getStart()), 1.0e-10);
         Assert.assertTrue(Double.isInfinite(segments.get(0).getEnd().getX()) &&
                           segments.get(0).getEnd().getX() > 0);
         Assert.assertTrue(Double.isInfinite(segments.get(0).getEnd().getY()) &&
@@ -111,56 +111,56 @@ public class SubLineTest {
 
     @Test
     public void testIntersectionInsideInside() throws MathIllegalArgumentException {
-        SubLine sub1 = new SubLine(new Vector3D(1, 1, 1), new Vector3D(3, 1, 1), 1.0e-10);
-        SubLine sub2 = new SubLine(new Vector3D(2, 0, 0), new Vector3D(2, 2, 2), 1.0e-10);
-        Assert.assertEquals(0.0, new Vector3D(2, 1, 1).distance(sub1.intersection(sub2, true)),  1.0e-12);
-        Assert.assertEquals(0.0, new Vector3D(2, 1, 1).distance(sub1.intersection(sub2, false)), 1.0e-12);
+        SubLine sub1 = new SubLine(new Coordinates3D(1, 1, 1), new Coordinates3D(3, 1, 1), 1.0e-10);
+        SubLine sub2 = new SubLine(new Coordinates3D(2, 0, 0), new Coordinates3D(2, 2, 2), 1.0e-10);
+        Assert.assertEquals(0.0, new Coordinates3D(2, 1, 1).distance(sub1.intersection(sub2, true)),  1.0e-12);
+        Assert.assertEquals(0.0, new Coordinates3D(2, 1, 1).distance(sub1.intersection(sub2, false)), 1.0e-12);
     }
 
     @Test
     public void testIntersectionInsideBoundary() throws MathIllegalArgumentException {
-        SubLine sub1 = new SubLine(new Vector3D(1, 1, 1), new Vector3D(3, 1, 1), 1.0e-10);
-        SubLine sub2 = new SubLine(new Vector3D(2, 0, 0), new Vector3D(2, 1, 1), 1.0e-10);
-        Assert.assertEquals(0.0, new Vector3D(2, 1, 1).distance(sub1.intersection(sub2, true)),  1.0e-12);
+        SubLine sub1 = new SubLine(new Coordinates3D(1, 1, 1), new Coordinates3D(3, 1, 1), 1.0e-10);
+        SubLine sub2 = new SubLine(new Coordinates3D(2, 0, 0), new Coordinates3D(2, 1, 1), 1.0e-10);
+        Assert.assertEquals(0.0, new Coordinates3D(2, 1, 1).distance(sub1.intersection(sub2, true)),  1.0e-12);
         Assert.assertNull(sub1.intersection(sub2, false));
     }
 
     @Test
     public void testIntersectionInsideOutside() throws MathIllegalArgumentException {
-        SubLine sub1 = new SubLine(new Vector3D(1, 1, 1), new Vector3D(3, 1, 1), 1.0e-10);
-        SubLine sub2 = new SubLine(new Vector3D(2, 0, 0), new Vector3D(2, 0.5, 0.5), 1.0e-10);
+        SubLine sub1 = new SubLine(new Coordinates3D(1, 1, 1), new Coordinates3D(3, 1, 1), 1.0e-10);
+        SubLine sub2 = new SubLine(new Coordinates3D(2, 0, 0), new Coordinates3D(2, 0.5, 0.5), 1.0e-10);
         Assert.assertNull(sub1.intersection(sub2, true));
         Assert.assertNull(sub1.intersection(sub2, false));
     }
 
     @Test
     public void testIntersectionBoundaryBoundary() throws MathIllegalArgumentException {
-        SubLine sub1 = new SubLine(new Vector3D(1, 1, 1), new Vector3D(2, 1, 1), 1.0e-10);
-        SubLine sub2 = new SubLine(new Vector3D(2, 0, 0), new Vector3D(2, 1, 1), 1.0e-10);
-        Assert.assertEquals(0.0, new Vector3D(2, 1, 1).distance(sub1.intersection(sub2, true)),  1.0e-12);
+        SubLine sub1 = new SubLine(new Coordinates3D(1, 1, 1), new Coordinates3D(2, 1, 1), 1.0e-10);
+        SubLine sub2 = new SubLine(new Coordinates3D(2, 0, 0), new Coordinates3D(2, 1, 1), 1.0e-10);
+        Assert.assertEquals(0.0, new Coordinates3D(2, 1, 1).distance(sub1.intersection(sub2, true)),  1.0e-12);
         Assert.assertNull(sub1.intersection(sub2, false));
     }
 
     @Test
     public void testIntersectionBoundaryOutside() throws MathIllegalArgumentException {
-        SubLine sub1 = new SubLine(new Vector3D(1, 1, 1), new Vector3D(2, 1, 1), 1.0e-10);
-        SubLine sub2 = new SubLine(new Vector3D(2, 0, 0), new Vector3D(2, 0.5, 0.5), 1.0e-10);
+        SubLine sub1 = new SubLine(new Coordinates3D(1, 1, 1), new Coordinates3D(2, 1, 1), 1.0e-10);
+        SubLine sub2 = new SubLine(new Coordinates3D(2, 0, 0), new Coordinates3D(2, 0.5, 0.5), 1.0e-10);
         Assert.assertNull(sub1.intersection(sub2, true));
         Assert.assertNull(sub1.intersection(sub2, false));
     }
 
     @Test
     public void testIntersectionOutsideOutside() throws MathIllegalArgumentException {
-        SubLine sub1 = new SubLine(new Vector3D(1, 1, 1), new Vector3D(1.5, 1, 1), 1.0e-10);
-        SubLine sub2 = new SubLine(new Vector3D(2, 0, 0), new Vector3D(2, 0.5, 0.5), 1.0e-10);
+        SubLine sub1 = new SubLine(new Coordinates3D(1, 1, 1), new Coordinates3D(1.5, 1, 1), 1.0e-10);
+        SubLine sub2 = new SubLine(new Coordinates3D(2, 0, 0), new Coordinates3D(2, 0.5, 0.5), 1.0e-10);
         Assert.assertNull(sub1.intersection(sub2, true));
         Assert.assertNull(sub1.intersection(sub2, false));
     }
 
     @Test
     public void testIntersectionNotIntersecting() throws MathIllegalArgumentException {
-        SubLine sub1 = new SubLine(new Vector3D(1, 1, 1), new Vector3D(1.5, 1, 1), 1.0e-10);
-        SubLine sub2 = new SubLine(new Vector3D(2, 3, 0), new Vector3D(2, 3, 0.5), 1.0e-10);
+        SubLine sub1 = new SubLine(new Coordinates3D(1, 1, 1), new Coordinates3D(1.5, 1, 1), 1.0e-10);
+        SubLine sub2 = new SubLine(new Coordinates3D(2, 3, 0), new Coordinates3D(2, 3, 0.5), 1.0e-10);
         Assert.assertNull(sub1.intersection(sub2, true));
         Assert.assertNull(sub1.intersection(sub2, false));
     }

http://git-wip-us.apache.org/repos/asf/commons-math/blob/b815d2af/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/Vector3DFormatAbstractTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/Vector3DFormatAbstractTest.java b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/Vector3DFormatAbstractTest.java
index a8c13e6..048a769 100644
--- a/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/Vector3DFormatAbstractTest.java
+++ b/src/test/java/org/apache/commons/math4/geometry/euclidean/threed/Vector3DFormatAbstractTest.java
@@ -22,7 +22,7 @@ import java.text.ParsePosition;
 import java.util.Locale;
 
 import org.apache.commons.math4.exception.MathParseException;
-import org.apache.commons.math4.geometry.euclidean.threed.Vector3D;
+import org.apache.commons.math4.geometry.euclidean.threed.Coordinates3D;
 import org.apache.commons.math4.geometry.euclidean.threed.Vector3DFormat;
 import org.junit.Test;
 import org.junit.Assert;
@@ -45,7 +45,7 @@ public abstract class Vector3DFormatAbstractTest {
 
     @Test
     public void testSimpleNoDecimals() {
-        Vector3D c = new Vector3D(1, 1, 1);
+        Coordinates3D c = new Coordinates3D(1, 1, 1);
         String expected = "{1; 1; 1}";
         String actual = vector3DFormat.format(c);
         Assert.assertEquals(expected, actual);
@@ -53,7 +53,7 @@ public abstract class Vector3DFormatAbstractTest {
 
     @Test
     public void testSimpleWithDecimals() {
-        Vector3D c = new Vector3D(1.23, 1.43, 1.63);
+        Coordinates3D c = new Coordinates3D(1.23, 1.43, 1.63);
         String expected =
             "{1"    + getDecimalCharacter() +
             "23; 1" + getDecimalCharacter() +
@@ -65,7 +65,7 @@ public abstract class Vector3DFormatAbstractTest {
 
     @Test
     public void testSimpleWithDecimalsTrunc() {
-        Vector3D c = new Vector3D(1.232323232323, 1.434343434343, 1.633333333333);
+        Coordinates3D c = new Coordinates3D(1.232323232323, 1.434343434343, 1.633333333333);
         String expected =
             "{1"    + getDecimalCharacter() +
             "2323232323; 1" + getDecimalCharacter() +
@@ -77,7 +77,7 @@ public abstract class Vector3DFormatAbstractTest {
 
     @Test
     public void testNegativeX() {
-        Vector3D c = new Vector3D(-1.232323232323, 1.43, 1.63);
+        Coordinates3D c = new Coordinates3D(-1.232323232323, 1.43, 1.63);
         String expected =
             "{-1"    + getDecimalCharacter() +
             "2323232323; 1" + getDecimalCharacter() +
@@ -89,7 +89,7 @@ public abstract class Vector3DFormatAbstractTest {
 
     @Test
     public void testNegativeY() {
-        Vector3D c = new Vector3D(1.23, -1.434343434343, 1.63);
+        Coordinates3D c = new Coordinates3D(1.23, -1.434343434343, 1.63);
         String expected =
             "{1"    + getDecimalCharacter() +
             "23; -1" + getDecimalCharacter() +
@@ -101,7 +101,7 @@ public abstract class Vector3DFormatAbstractTest {
 
     @Test
     public void testNegativeZ() {
-        Vector3D c = new Vector3D(1.23, 1.43, -1.633333333333);
+        Coordinates3D c = new Coordinates3D(1.23, 1.43, -1.633333333333);
         String expected =
             "{1"    + getDecimalCharacter() +
             "23; 1" + getDecimalCharacter() +
@@ -113,7 +113,7 @@ public abstract class Vector3DFormatAbstractTest {
 
     @Test
     public void testNonDefaultSetting() {
-        Vector3D c = new Vector3D(1, 1, 1);
+        Coordinates3D c = new Coordinates3D(1, 1, 1);
         String expected = "[1 : 1 : 1]";
         String actual = vector3DFormatSquare.format(c);
         Assert.assertEquals(expected, actual);
@@ -124,7 +124,7 @@ public abstract class Vector3DFormatAbstractTest {
         Locale defaultLocal = Locale.getDefault();
         Locale.setDefault(getLocale());
 
-        Vector3D c = new Vector3D(232.22222222222, -342.3333333333, 432.44444444444);
+        Coordinates3D c = new Coordinates3D(232.22222222222, -342.3333333333, 432.44444444444);
         String expected =
             "{232"    + getDecimalCharacter() +
             "2222222222; -342" + getDecimalCharacter() +
@@ -138,7 +138,7 @@ public abstract class Vector3DFormatAbstractTest {
 
     @Test
     public void testNan() {
-        Vector3D c = Vector3D.NaN;
+        Coordinates3D c = Coordinates3D.NaN;
         String expected = "{(NaN); (NaN); (NaN)}";
         String actual = vector3DFormat.format(c);
         Assert.assertEquals(expected, actual);
@@ -146,7 +146,7 @@ public abstract class Vector3DFormatAbstractTest {
 
     @Test
     public void testPositiveInfinity() {
-        Vector3D c = Vector3D.POSITIVE_INFINITY;
+        Coordinates3D c = Coordinates3D.POSITIVE_INFINITY;
         String expected = "{(Infinity); (Infinity); (Infinity)}";
         String actual = vector3DFormat.format(c);
         Assert.assertEquals(expected, actual);
@@ -154,7 +154,7 @@ public abstract class Vector3DFormatAbstractTest {
 
     @Test
     public void tesNegativeInfinity() {
-        Vector3D c = Vector3D.NEGATIVE_INFINITY;
+        Coordinates3D c = Coordinates3D.NEGATIVE_INFINITY;
         String expected = "{(-Infinity); (-Infinity); (-Infinity)}";
         String actual = vector3DFormat.format(c);
         Assert.assertEquals(expected, actual);
@@ -163,14 +163,14 @@ public abstract class Vector3DFormatAbstractTest {
     @Test
     public void testParseSimpleNoDecimals() throws MathParseException {
         String source = "{1; 1; 1}";
-        Vector3D expected = new Vector3D(1, 1, 1);
-        Vector3D actual = vector3DFormat.parse(source);
+        Coordinates3D expected = new Coordinates3D(1, 1, 1);
+        Coordinates3D actual = vector3DFormat.parse(source);
         Assert.assertEquals(expected, actual);
     }
 
     @Test
     public void testParseIgnoredWhitespace() {
-        Vector3D expected = new Vector3D(1, 1, 1);
+        Coordinates3D expected = new Coordinates3D(1, 1, 1);
         ParsePosition pos1 = new ParsePosition(0);
         String source1 = "{1;1;1}";
         Assert.assertEquals(expected, vector3DFormat.parse(source1, pos1));
@@ -188,8 +188,8 @@ public abstract class Vector3DFormatAbstractTest {
             "23; 1" + getDecimalCharacter() +
             "43; 1" + getDecimalCharacter() +
             "63}";
-        Vector3D expected = new Vector3D(1.23, 1.43, 1.63);
-        Vector3D actual = vector3DFormat.parse(source);
+        Coordinates3D expected = new Coordinates3D(1.23, 1.43, 1.63);
+        Coordinates3D actual = vector3DFormat.parse(source);
         Assert.assertEquals(expected, actual);
     }
 
@@ -200,8 +200,8 @@ public abstract class Vector3DFormatAbstractTest {
             "2323; 1" + getDecimalCharacter() +
             "4343; 1" + getDecimalCharacter() +
             "6333}";
-        Vector3D expected = new Vector3D(1.2323, 1.4343, 1.6333);
-        Vector3D actual = vector3DFormat.parse(source);
+        Coordinates3D expected = new Coordinates3D(1.2323, 1.4343, 1.6333);
+        Coordinates3D actual = vector3DFormat.parse(source);
         Assert.assertEquals(expected, actual);
     }
 
@@ -212,8 +212,8 @@ public abstract class Vector3DFormatAbstractTest {
             "2323; 1" + getDecimalCharacter() +
             "4343; 1" + getDecimalCharacter() +
             "6333}";
-        Vector3D expected = new Vector3D(-1.2323, 1.4343, 1.6333);
-        Vector3D actual = vector3DFormat.parse(source);
+        Coordinates3D expected = new Coordinates3D(-1.2323, 1.4343, 1.6333);
+        Coordinates3D actual = vector3DFormat.parse(source);
         Assert.assertEquals(expected, actual);
     }
 
@@ -224,8 +224,8 @@ public abstract class Vector3DFormatAbstractTest {
             "2323; -1" + getDecimalCharacter() +
             "4343; 1" + getDecimalCharacter() +
             "6333}";
-        Vector3D expected = new Vector3D(1.2323, -1.4343, 1.6333);
-        Vector3D actual = vector3DFormat.parse(source);
+        Coordinates3D expected = new Coordinates3D(1.2323, -1.4343, 1.6333);
+        Coordinates3D actual = vector3DFormat.parse(source);
         Assert.assertEquals(expected, actual);
     }
 
@@ -236,8 +236,8 @@ public abstract class Vector3DFormatAbstractTest {
             "2323; 1" + getDecimalCharacter() +
             "4343; -1" + getDecimalCharacter() +
             "6333}";
-        Vector3D expected = new Vector3D(1.2323, 1.4343, -1.6333);
-        Vector3D actual = vector3DFormat.parse(source);
+        Coordinates3D expected = new Coordinates3D(1.2323, 1.4343, -1.6333);
+        Coordinates3D actual = vector3DFormat.parse(source);
         Assert.assertEquals(expected, actual);
     }
 
@@ -248,8 +248,8 @@ public abstract class Vector3DFormatAbstractTest {
             "2323; -1" + getDecimalCharacter() +
             "4343; -1" + getDecimalCharacter() +
             "6333}";
-        Vector3D expected = new Vector3D(-1.2323, -1.4343, -1.6333);
-        Vector3D actual = vector3DFormat.parse(source);
+        Coordinates3D expected = new Coordinates3D(-1.2323, -1.4343, -1.6333);
+        Coordinates3D actual = vector3DFormat.parse(source);
         Assert.assertEquals(expected, actual);
     }
 
@@ -260,8 +260,8 @@ public abstract class Vector3DFormatAbstractTest {
             "0; -1" + getDecimalCharacter() +
             "4343; 1" + getDecimalCharacter() +
             "6333}";
-        Vector3D expected = new Vector3D(0.0, -1.4343, 1.6333);
-        Vector3D actual = vector3DFormat.parse(source);
+        Coordinates3D expected = new Coordinates3D(0.0, -1.4343, 1.6333);
+        Coordinates3D actual = vector3DFormat.parse(source);
         Assert.assertEquals(expected, actual);
     }
 
@@ -272,30 +272,30 @@ public abstract class Vector3DFormatAbstractTest {
             "2323 : 1" + getDecimalCharacter() +
             "4343 : 1" + getDecimalCharacter() +
             "6333]";
-        Vector3D expected = new Vector3D(1.2323, 1.4343, 1.6333);
-        Vector3D actual = vector3DFormatSquare.parse(source);
+        Coordinates3D expected = new Coordinates3D(1.2323, 1.4343, 1.6333);
+        Coordinates3D actual = vector3DFormatSquare.parse(source);
         Assert.assertEquals(expected, actual);
     }
 
     @Test
     public void testParseNan() throws MathParseException {
         String source = "{(NaN); (NaN); (NaN)}";
-        Vector3D actual = vector3DFormat.parse(source);
-        Assert.assertEquals(Vector3D.NaN, actual);
+        Coordinates3D actual = vector3DFormat.parse(source);
+        Assert.assertEquals(Coordinates3D.NaN, actual);
     }
 
     @Test
     public void testParsePositiveInfinity() throws MathParseException {
         String source = "{(Infinity); (Infinity); (Infinity)}";
-        Vector3D actual = vector3DFormat.parse(source);
-        Assert.assertEquals(Vector3D.POSITIVE_INFINITY, actual);
+        Coordinates3D actual = vector3DFormat.parse(source);
+        Assert.assertEquals(Coordinates3D.POSITIVE_INFINITY, actual);
     }
 
     @Test
     public void testParseNegativeInfinity() throws MathParseException {
         String source = "{(-Infinity); (-Infinity); (-Infinity)}";
-        Vector3D actual = vector3DFormat.parse(source);
-        Assert.assertEquals(Vector3D.NEGATIVE_INFINITY, actual);
+        Coordinates3D actual = vector3DFormat.parse(source);
+        Assert.assertEquals(Coordinates3D.NEGATIVE_INFINITY, actual);
     }
 
     @Test


Mime
View raw message