public double GetAlpha(Matrix <double> r2)
        {
            Matrix <double> r     = r2.Transpose();
            Matrix <double> r3    = RotationM.Multiply(r);
            double          alpha = GetAngle(r3);

            return(alpha);
        }
        public Point3D[] Sample(Point3D[] points) // from micro to macro
        {
            Vector <double> v = Vector <double> .Build.Dense(3);

            Point3D[] pointsReturn = new Point3D[points.Length];
            for (int i = 0; i < points.Length; i++)
            {
                v[0] = points[i].X;
                v[1] = points[i].Y;
                v[2] = points[i].Z;

                Vector <double> u = RotationM.Multiply(v);
                u += Translation;
                Point3D newPoint = new Point3D(u[0], u[1], u[2]);
                pointsReturn[i] = newPoint;
            }
            return(pointsReturn);
        }
        public double GetValue(double x, double y, double z)
        {
            Vector <double> v = Vector <double> .Build.Dense(3);

            v[0] = x;
            v[1] = y;
            v[2] = z;

            Vector <double> u = RotationM.Multiply(v);

            u += Translation;
            Point3D Q = new Point3D(u[0], u[1], u[2]);

            if (u[0] > Measures[0] && u[1] > Measures[1] && u[2] > Measures[2] && u[0] <= 0 && u[1] <= 0 && u[2] <= 0)
            {
                Console.WriteLine();
            }
            return(vData.GetValue(Q));
        }
        public Point3D[] SampleShifted(Point3D[] points) // from micro to macro
        {
            Vector <double> v = Vector <double> .Build.Dense(3);

            Vector <double> hel = Vector <double> .Build.Dense(3);

            Point3D[] pointsReturn = new Point3D[points.Length];
            for (int i = 0; i < points.Length; i++)
            {
                v[0] = points[i].X;
                v[1] = points[i].Y;
                v[2] = points[i].Z;

                hel[0] = this.rnd.NextDouble();
                hel[1] = this.rnd.NextDouble();
                hel[2] = this.rnd.NextDouble();

                Vector <double> u = RotationM.Multiply(v);
                u = u + Translation + hel;
                Point3D newPoint = new Point3D(u[0], u[1], u[2]);
                pointsReturn[i] = newPoint;
            }
            return(pointsReturn);
        }
 public void Rotate(Matrix <double> r)
 {
     RotationM = RotationM.Multiply(r);
 }