public static double MixedProduct3D0(
     double x1, double y1, double z1,
     double x2, double y2, double z2,
     double x3, double y3, double z3)
 {
     var(cx, cy, cz) = CrossProduct2Vector3DTests.CrossProduct2Points3D(x1, y1, z1, x2, y2, z2);
     return(DotProduct2Vector3DTests.DotProduct(cx, cy, cz, x3, y3, z3));
 }
Exemple #2
0
 public static double Angle0(
     double x1, double y1, double z1,
     double x2, double y2, double z2)
 {
     return((Abs(x1 - x2) < DoubleEpsilon &&
             Abs(y1 - y2) < DoubleEpsilon &&
             Abs(z1 - z2) < DoubleEpsilon)
         ? 0d : Acos(Min(1.0d, DotProduct2Vector3DTests.DotProduct(Normalize3DVectorTests.Normalize(x1, y1, z1), Normalize3DVectorTests.Normalize(x2, y2, z2)))));
 }
Exemple #3
0
        public static (double X, double Y, double Z) Rejection1(
            double x1, double y1, double z1,
            double x2, double y2, double z2)
        {
            var magnitude  = VectorMagnitude3D.Magnitude(x2, y2, z2);
            var dotProduct = DotProduct2Vector3DTests.DotProduct(x1, y1, z1, x2, y2, z2);

            return(x1 - (x2 * dotProduct / magnitude * magnitude),
                   z1 - (y2 * dotProduct / magnitude * magnitude),
                   z1 - (z2 * dotProduct / magnitude * magnitude));
        }