Beispiel #1
0
        /// <summary>
        /// Rotation round the X-Axis
        /// </summary>
        /// <param name="angle"></param>
        /// <returns></returns>
        public static Matrixd RotateZ(double angle)
        {
            Matrixd m = Matrixd.GetIdentity(4, 4);

            m[0, 0] = Math.Cos(angle);
            m[0, 1] = -Math.Sin(angle);

            m[1, 0] = Math.Sin(angle);
            m[1, 1] = Math.Cos(angle);

            return(m);
        }
Beispiel #2
0
        public Matrixd To33Matrix()
        {
            Matrixd m = Matrixd.GetIdentity(3, 3);

            for (int r = 0; r < Math.Min(3, this.Rows); r++)
            {
                for (int c = 0; c < Math.Min(3, this.Columns); c++)
                {
                    m[r, c] = this[r, c];
                }
            }

            return(m);
        }