Exemplo n.º 1
0
 private static void PonTamano(TMatriz Mat)
 {
     Console.Clear ();
     Console.WriteLine("Digite Numero de Filas .. ");
     Mat.Filas = uint.Parse (Console.ReadLine ());
     Console.WriteLine("Digite Numero de Columnas .. ");
     Mat.Columnas = uint.Parse (Console.ReadLine ());
 }
Exemplo n.º 2
0
 public Matriz(double tx, double ty)
 {
     double[,] m = new double[, ] {
         { 1, 0, 0 },
         { 0, 1, 0 },
         { tx, ty, 1 }
     };
     matriz  = m;
     tmatriz = TMatriz.Traslacion;
 }
Exemplo n.º 3
0
 private static string NombreOperacion(TMatriz Mat)
 {
     string Nom = "";
     if (Mat is TMatriz3) {
         Nom = "Promedio";
     } else if (Mat is TMatriz2) {
         Nom = "Promedio impares de filas pares";
     } else if (Mat is TMatriz1) {
         Nom = "Suma";
     }
     return Nom;
 }
Exemplo n.º 4
0
        public Matriz(double angulo)
        {
            angulo = angulo * Math.PI / 180.0;

            double[,] m = new double[, ] {
                { (Math.Cos(angulo)), (Math.Sin(angulo)), 0 },
                { (-Math.Sin(angulo)), (Math.Cos(angulo)), 0 },
                { 0, 0, 1 }
            };
            matriz  = m;
            tmatriz = TMatriz.Rotacion;
        }
Exemplo n.º 5
0
 private static void Mostrar(TMatriz Mat)
 {
     int i, j;
     Console.Clear ();
     for(i=0;i<Mat.Columnas;i++){
         for (j=0; j<Mat.Filas; j++) {
             Console.Write ("{0} ", Mat.Matriz[i,j]);
         }
         Console.WriteLine(" ");
     }
     Console.WriteLine ("Presione Cualquier Tecla ...");
     Console.ReadKey ();
 }
Exemplo n.º 6
0
 public Matriz(double escalaX, double escalaY, bool crece)
 {
     if (crece)
     {
         double[,] m = new double[, ] {
             { escalaX, 0, 0 },
             { 0, escalaY, 0 },
             { 0, 0, 1 }
         };
         matriz  = m;
         tmatriz = TMatriz.Escalamiento;
     }
     else
     {
         double[,] m = new double[, ] {
             { 1 / escalaX, 0, 0 },
             { 0, 1 / escalaY, 0 },
             { 0, 0, 1 }
         };
         matriz  = m;
         tmatriz = TMatriz.Escalamiento;
     }
 }
Exemplo n.º 7
0
 private static void VerOperacion(TMatriz Mat)
 {
     Console.Clear ();
     Console.WriteLine ("{0}={1}",NombreOperacion(Mat),Mat.Operacion());
 }
Exemplo n.º 8
0
 public Matriz(double[,] matriz, TMatriz tmatriz)
 {
     this.matriz  = matriz;
     this.tmatriz = tmatriz;
 }