示例#1
0
        public static double[] ScaleInvert(double[] vec, double sr, double sc)
        {
            double[,] m = new double[, ] {
                { 1 / sr, 0.0, 0.0 },
                { 0.0, 1 / sc, 0.0 },
                { 0.0, 0.0, 1.0 }
            };

            NcvMatrix mat = new NcvMatrix(m);

            return(mat.Multiply(vec));
        }
示例#2
0
        public static double[] TranslateInvert(double[] vec, double tr, double tc)
        {
            double[,] m = new double[, ] {
                { 1.0, 0.0, -tr },
                { 0.0, 1.0, -tc },
                { 0.0, 0.0, 1.0 }
            };

            NcvMatrix mat = new NcvMatrix(m);

            return(mat.Multiply(vec));
        }
示例#3
0
        public static double[] SkewInvert(double[] vec, double theta)
        {
            double cos = System.Math.Cos(theta);
            double sin = System.Math.Sin(theta);

            double[,] m = new double[, ] {
                { 1 / cos, 0.0, 0.0 },
                { -sin / cos, 1.0, 0.0 },
                { 0.0, 0.0, 1.0 }
            };

            NcvMatrix mat = new NcvMatrix(m);

            return(mat.Multiply(vec));
        }
示例#4
0
        public static double[] RotateInvert(double[] vec, double alpha)
        {
            double cos = System.Math.Cos(alpha);
            double sin = System.Math.Sin(alpha);

            double[,] m = new double[, ] {
                { cos, sin, 0.0 },
                { -sin, cos, 0.0 },
                { 0.0, 0.0, 1.0 }
            };

            NcvMatrix mat = new NcvMatrix(m);

            return(mat.Multiply(vec));
        }