Example #1
0
        /// <summary>
        ///
        ///PINTA LOS VECTORES PERPENDICULARES DE LOS PLANOS , EL VECTOR PARALELO A LA LINEA DE
        ///INTERSECCION Y CONTINUA LA EXPLICACION
        ///
        ///
        /// </summary>
        ///
        private void PrepararResultado()
        {
            lbExplicacion.Text = " Una vez obtenido un punto de paso de la recta de intersección, falta obtener el vector paralelo a esa recta.\nEl vector paralelo a la recta, ha de ser un vector perpendicular a los vectores perpendiculares de los dos planos. Para obtener este vector, podemos calcular el producto cruz entre los vectores perpendiculares de los planos.";

            // Obtener el vector perpendicular a los vectores perpendiculares de los planos
            paralelo = Vector.ProductoCruz(plano1.VectorPerpendicular, plano2.VectorPerpendicular);
            if (!directa)
            {
                label2.Text     += "\n\nVector paralelo a la recta de intersección: \n" + paralelo.ToString();
                flotante.Height += 40;
            }
            // Construir la recta de interseccion
            interseccion = plano1.Interseccion(plano2);

            //Vector paralelo a la recta de interseccion
            paralelo = new Vector(new Punto("0 0 0"), new Punto(paralelo.Componentes));

            // Pintar los vectores perpendiculares
            Vector perpendicular1 = new Vector(new Punto("0 0 0"), new Punto(plano1.VectorPerpendicular.Componentes));
            Vector perpendicular2 = new Vector(new Punto("0 0 0"), new Punto(plano2.VectorPerpendicular.Componentes));


            ventanagrafica.PintarVector(interseccion.PuntoDePaso, new Punto(new Racional[3] {
                perpendicular1.Componentes[0] + interseccion.PuntoDePaso.X, perpendicular1.Componentes[1] + interseccion.PuntoDePaso.Y, perpendicular1.Componentes[2] + interseccion.PuntoDePaso.Z
            }), Color.DarkOrange, 4, false);
            ventanagrafica.PintarVector(interseccion.PuntoDePaso, new Punto(new Racional[3] {
                perpendicular2.Componentes[0] + interseccion.PuntoDePaso.X, perpendicular2.Componentes[1] + interseccion.PuntoDePaso.Y, perpendicular2.Componentes[2] + interseccion.PuntoDePaso.Z
            }), Color.SlateBlue, 4, false);

            ventanagrafica.PintarVector(interseccion.PuntoDePaso, new Punto(new Racional[3] {
                paralelo.Componentes[0] / 2 + interseccion.PuntoDePaso.X, paralelo.Componentes[1] / 2 + interseccion.PuntoDePaso.Y, paralelo.Componentes[2] / 2 + interseccion.PuntoDePaso.Z
            }), Color.Red, 4, false);


            ventanagrafica.Ventana.Invalidate();



            if (directa)
            {
                FinalizarResolucion();
            }
        }
Example #2
0
        /// <summary>
        ///
        ///DIBUJA EL VECTOR ENTRE EL PUNTO DEL QUE SE QUIERE ENCONTRAR LA DISTANCIA A LA RECTA
        ///Y EL PUNTO DE INTERSECCION DE LA RECTA CON EL PLANO Y FINALIZA LA EXPLICACION
        ///
        ///
        /// </summary>
        ///
        private void FinalizarResolucion()
        {
            label1.Location = btContinuar.Location;
            btContinuar.Hide();
            lbExplicacion.Text = "Por último, construimos el vector entre el punto del que queremos saber la distancia a la recta , y el punto de intersección de la recta con el plano.\nLa distancia buscada, es el módulo de este vector.";

            // Construir el vector entre los puntos
            Vector vector = new Vector(punto3, interseccion);

            if (!directa)
            {
                // lbVector.Show();
                //  lbVector.Text = "Vector entre los puntos:\n " + vector.ToString();
                label1.Text += "\nVector entre los puntos:\n " + Math.Round(vector.Componentes[0].ToDouble(), 4).ToString() + "i";
                if (vector.Componentes[1].Numerador > 0)
                {
                    label1.Text += " + ";
                }
                label1.Text += Math.Round(vector.Componentes[1].ToDouble(), 4).ToString() + "j";
                if (vector.Componentes[2].Numerador > 0)
                {
                    label1.Text += " + ";
                }
                label1.Text += Math.Round(vector.Componentes[2].ToDouble(), 4).ToString() + "k";
            }
            // Dibujar el vector
            ventanagrafica.PintarVector(punto3, interseccion, Color.Chartreuse, 5, false);

            //ventanagrafica.AñadirPunto(plano.Interseccion(linea1), 10, false, Color.Red);

            // Mostrar el resultado
            double modulo = Math.Sqrt((Math.Pow(vector.Componentes[0].ToDouble(), 2) + Math.Pow(vector.Componentes[1].ToDouble(), 2) + Math.Pow(vector.Componentes[2].ToDouble(), 2)));

            lbResultado.Show();
            lbResultado.Text     = "Distancia entre el punto y la recta: \n" + modulo.ToString();
            lbResultado.Location = new Point(5, lbExplicacion.Height + 5);
            btCentrar.PerformClick();
        }
Example #3
0
        /// <summary>
        ///
        /// DIBUJA EL PUNTO DE PASO,  EL VECTOR PERPENDICULAR, EL PLANO E INICIA LA EXPLICACION
        ///
        /// </summary>
        ///
        private void IniciarResolucion()
        {
            // Mostrar los controles
            lbTituloAnguloX.Visible = true; btIsometrica.Visible = true;
            lbAnguloX.Visible       = true; btAlzado.Visible = true;
            sbAngulox.Visible       = true; btPerfil.Visible = true;
            lbTituloAnguloY.Visible = true; btPlanta.Visible = true;
            lbAnguloY.Visible       = true;
            sbAnguloY.Visible       = true;
            lbTituloAnguloZ.Visible = true;
            lbAnguloZ.Visible       = true;
            sbAnguloZ.Visible       = true;
            btZoomMas.Visible       = true;
            btZoomMenos.Visible     = true;
            lbZoomtitulo.Visible    = true;
            lbAjustar.Visible       = true;
            btAjustar.Visible       = true;
            pnZoom.Visible          = true;
            btAbajo.Visible         = true;
            btArriba.Visible        = true;
            btDerecha.Visible       = true;
            btIzquierda.Visible     = true;
            btCentrar.Visible       = true;
            btContinuar.Visible     = true;
            // Establecer los valores por defecto
            if (defecto)
            {
                tbPunto1X.Text = "15"; tbPunto1Y.Text = "25"; tbPunto1Z.Text = "6";
                tbPunto2X.Text = "13"; tbPunto2Y.Text = "8"; tbPunto2Z.Text = "30";
            }
            punto1 = new Punto(tbPunto1X.Text + " " + tbPunto1Y.Text + " " + tbPunto1Z.Text);
            vector = new Vector(tbPunto2X.Text + " " + tbPunto2Y.Text + " " + tbPunto2Z.Text);
            plano  = new Plano(vector, punto1);

            lbExplicacion.Text = " Un plano en el espacio, se define por un punto de paso del plano, y un vector perpendicular al mismo.\n En la imagen puede verse el punto introducido en color naranja, el vector perpendicular en color azul y una porción del plano en color verde.";

            if (directa)
            {
                lbExplicacion.Hide();
            }

            // Dibujar el vector perpendicular al plano
            ventanagrafica.PintarVector(new Punto("0 0 0"), new Punto(vector.Componentes), Color.SlateBlue, 5, true);
            //Dibujar el punto de paso del plano
            ventanagrafica.PintarPunto(punto1, 10, true, Color.DarkOrange);

            // Dibujar la porcion de plano
            ventanagrafica.PintarPlano(vector, punto1, 50, Color.Chartreuse);

            if (directa)
            {
                ContinuarResolucion();
            }
            btIsometrica.PerformClick();
            btAjustar.PerformClick();
            if (defecto)
            {
                btArriba.PerformClick();
                btArriba.PerformClick();
            }
            paso = 1;
        }
Example #4
0
        /// <summary>
        ///
        /// DIBUJA LOS PUNTOS, EL SEGMENTO DE LINEA Y EL VECTOR E INICIA LA EXPLICACION
        ///
        /// </summary>
        ///
        private void IniciarResolucion()
        {
            btIsometrica.PerformClick();
            if (defecto)
            {
                this.Focus();
                btContinuar.Visible = true;
                this.AcceptButton   = this.btContinuar;
                paso++;
                tbPunto1X.Text  = "-27";
                tbPunto1Y.Text  = "-61";
                tbPunto1Z.Text  = "17";
                tbPunto2X.Text  = "23";
                tbPunto2Y.Text  = "39";
                tbPunto2Z.Text  = "-8";
                tbPunto3X.Text  = "50";
                tbPunto3Y.Text  = "-30";
                tbPunto3Z.Text  = "20";
                tbPunto4X.Text  = "79/2";
                tbPunto4Y.Text  = "267/2";
                tbPunto4Z.Text  = "-37";
                sbAnguloZ.Value = 70;
                sbAnguloY.Value = -30;
                sbAngulox.Value = 30;
            }

            // Mostrar los controles
            lbTituloAnguloX.Visible = true; btIsometrica.Visible = true;
            lbAnguloX.Visible       = true; btAlzado.Visible = true;
            sbAngulox.Visible       = true; btPerfil.Visible = true;
            lbTituloAnguloY.Visible = true; btPlanta.Visible = true;
            lbAnguloY.Visible       = true;
            sbAnguloY.Visible       = true;
            lbTituloAnguloZ.Visible = true;
            lbAnguloZ.Visible       = true;
            sbAnguloZ.Visible       = true;
            btZoomMas.Visible       = true;
            btZoomMenos.Visible     = true;
            lbZoomtitulo.Visible    = true;
            lbAjustar.Visible       = true;
            btAjustar.Visible       = true;
            pnZoom.Visible          = true;
            btAbajo.Visible         = true;
            btArriba.Visible        = true;
            btDerecha.Visible       = true;
            btIzquierda.Visible     = true;
            btCentrar.Visible       = true;
            btContinuar.Visible     = true;
            btDefecto.Hide();

            punto1 = new Punto(tbPunto1X.Text + " " + tbPunto1Y.Text + " " + tbPunto1Z.Text);
            punto2 = new Punto(tbPunto2X.Text + " " + tbPunto2Y.Text + " " + tbPunto2Z.Text);
            punto3 = new Punto(tbPunto3X.Text + " " + tbPunto3Y.Text + " " + tbPunto3Z.Text);
            punto4 = new Punto(tbPunto4X.Text + " " + tbPunto4Y.Text + " " + tbPunto4Z.Text);

            lbExplicacion.Text = " Primero construimos las ecuaciones paramétricas de las rectas que pasan por los puntos introducidos. ( Ecuación de la recta en el menu anterior. )";
            if (directa)
            {
                lbExplicacion.Hide();
            }

            // Dibujar los segmentos de las lineas entre los puntos introducidos
            ventanagrafica.PintarVector(punto1, punto2, Color.DarkOrange, 3F, true);
            ventanagrafica.PintarVector(punto3, punto4, Color.SlateBlue, 3F, true);
            if (defecto)
            {
                btAjustar.PerformClick();
            }

            // Mostrar las ecuaciones paramétricas de la rectas en un recuadro flotante
            linea1 = new Recta(punto1, punto2);
            linea2 = new Recta(punto3, punto4);
            if (!directa)
            {
                flotante      = new ControlesFlotantes();
                flotante.Text = " Desarrollo de la resolución";
                flotante.pnParametro.Show();
                flotante.Location = new Point(btContinuar.Location.X, btContinuar.Location.Y + 20);
                flotante.pnParametro.Controls.Add(label1);
                flotante.Show();
                flotante.Opacity = 1;
                flotante.lbTituloParametro.Text = "Ecuaciones paramétricas de la recta 1:";
                flotante.sbValor.Hide();
                flotante.tbParametro.Hide();
                flotante.StartPosition = FormStartPosition.Manual;
                flotante.Location      = new Point(pnDatos.Location.X, pnDatos.Location.Y + pnDatos.Height + 5);
                foreach (Ecuacion e in linea1.EcuacionesParametricas())
                {
                    //flotante.lbTituloParametro.Text += "\n" + e.ObtenerTerminoIzquierda(0).ToString() + " = " + e.ObtenerTerminoDerecha(0).ToString();
                    double coef1 = Math.Round(e.ObtenerTerminoIzquierda(0).Coeficiente.ToDouble(), 4);
                    double coef2 = Math.Round(e.ObtenerTerminoDerecha(0).Coeficiente.ToDouble(), 4);
                    String ecu1  = "\n" + e.ObtenerTerminoIzquierda(0).Variables[0] + " = " + coef2.ToString() + " " + e.ObtenerTerminoDerecha(0).Variables[0];
                    //  flotante.lbTituloParametro.Text += "\n" + e.ObtenerTerminoIzquierda(0).Variables[0] + " = " + coef2.ToString() +" " + e.ObtenerTerminoDerecha(0).Variables[0];

                    if (e.ObtenerLadoDerecho.Largo > 1 && e.ObtenerTerminoDerecha(1).Coeficiente.Numerador > 0)
                    {
                        // flotante.lbTituloParametro.Text += " + ";
                        ecu1 += " + ";
                    }
                    else
                    {
                        //flotante.lbTituloParametro.Text += " ";
                        ecu1 += " ";
                    }
                    if (e.ObtenerLadoDerecho.Largo > 1)
                    {
                        //flotante.lbTituloParametro.Text += Math.Round(e.ObtenerTerminoDerecha(1).Coeficiente.ToDouble(), 4).ToString() +" "+ e.ObtenerTerminoDerecha(1).Variables[0];
                        ecu1 += Math.Round(e.ObtenerTerminoDerecha(1).Coeficiente.ToDouble(), 4).ToString() + " " + e.ObtenerTerminoDerecha(1).Variables[0];
                    }
                    ecu1 = ecu1.Replace('P', 't');
                    flotante.lbTituloParametro.Text += ecu1;
                }
                // flotante.lbTituloParametro.Text += "\n" + e.ToString();
                flotante.lbTituloParametro.Text += "\nEcuaciones paramétricas de la recta 2:";

                foreach (Ecuacion e in linea2.EcuacionesParametricas())
                {
                    double coef3 = Math.Round(e.ObtenerTerminoIzquierda(0).Coeficiente.ToDouble(), 4);
                    double coef4 = Math.Round(e.ObtenerTerminoDerecha(0).Coeficiente.ToDouble(), 4);
                    string ecu2  = "\n" + e.ObtenerTerminoIzquierda(0).Variables[0] + " = " + coef4.ToString() + " " + e.ObtenerTerminoDerecha(0).Variables[0];
                    // flotante.lbTituloParametro.Text += "\n" + e.ObtenerTerminoIzquierda(0).ToString() + " = " + e.ObtenerTerminoDerecha(0).ToString();
                    if (e.ObtenerLadoDerecho.Largo > 1 && e.ObtenerTerminoDerecha(1).Coeficiente.Numerador > 0)
                    {
                        //flotante.lbTituloParametro.Text += " + ";
                        ecu2 += " + ";
                    }
                    else
                    {
                        //flotante.lbTituloParametro.Text += " ";
                        ecu2 += " ";
                    }
                    if (e.ObtenerLadoDerecho.Largo > 1)
                    {
                        // flotante.lbTituloParametro.Text += Math.Round(e.ObtenerTerminoDerecha(1).Coeficiente.ToDouble(), 4).ToString() + e.ObtenerTerminoDerecha(1).Variables[0];
                        ecu2 += Math.Round(e.ObtenerTerminoDerecha(1).Coeficiente.ToDouble(), 4).ToString() + e.ObtenerTerminoDerecha(1).Variables[0];
                    }
                    ecu2 = ecu2.Replace('P', 's');
                    flotante.lbTituloParametro.Text += ecu2;
                }
                flotante.lbTituloParametro.Anchor    = AnchorStyles.Top;
                flotante.lbTituloParametro.TextAlign = ContentAlignment.MiddleLeft;
                flotante.lbTituloParametro.Location  = new Point(flotante.lbTituloParametro.Location.X - 100, flotante.lbTituloParametro.Location.Y);
                flotante.Size             = new Size(450, 200);
                flotante.pnParametro.Size = new Size(430, 180);
            }
            if (!directa)
            {
                btIsometrica.PerformClick();
            }
            if (directa)
            {
                ContinuarResolucion();
            }
        }
Example #5
0
        /// <summary>
        ///
        /// CONTRUYE LOS PUNTOS CON LOS VALORES INTRODUCIDOS EN LAS CAJAS DE TEXTO, CAMBIA EL TEXTO
        /// DEL BOTON ACEPTAR POR CONTINUAR , LO CAMBIA A COLOR VERDE OSCURO Y DIBUJA LOS PUNTOS EN
        /// EL AREA GRAFICA
        ///
        /// </summary>
        ///

        private void IniciarResolucion()
        {
            // Mostrar los controles
            lbTituloAnguloX.Visible = true; btIsometrica.Visible = true;
            lbAnguloX.Visible       = true; btAlzado.Visible = true;
            sbAngulox.Visible       = true; btPerfil.Visible = true;
            lbTituloAnguloY.Visible = true; btPlanta.Visible = true;
            lbAnguloY.Visible       = true;
            sbAnguloY.Visible       = true;
            lbTituloAnguloZ.Visible = true;
            lbAnguloZ.Visible       = true;
            sbAnguloZ.Visible       = true;
            btZoomMas.Visible       = true;
            btZoomMenos.Visible     = true;
            lbZoomtitulo.Visible    = true;
            lbAjustar.Visible       = true;
            btAjustar.Visible       = true;
            pnZoom.Visible          = true;
            btAbajo.Visible         = true;
            btArriba.Visible        = true;
            btDerecha.Visible       = true;
            btIzquierda.Visible     = true;
            btCentrar.Visible       = true;
            btContinuar.Visible     = true;

            if (!defecto) // Si no se ha pulsado el boton de resolucion con valores por defecto
            {
                punto1 = new Punto(tbPunto1X.Text + " " + tbPunto1Y.Text + " " + tbPunto1Z.Text);
                punto2 = new Punto(tbPunto2X.Text + " " + tbPunto2Y.Text + " " + tbPunto2Z.Text);
                btDefecto.Hide();
            }
            else
            {
                punto1                = new Punto("10 26 25");
                tbPunto1X.Text        = Racional.AString(punto1.X);
                tbPunto1Y.Text        = Racional.AString(punto1.Y);
                tbPunto1Z.Text        = Racional.AString(punto1.Z);
                punto2                = new Punto("25 -30 -40");
                tbPunto2X.Text        = Racional.AString(punto2.X);
                tbPunto2Y.Text        = Racional.AString(punto2.Y);
                tbPunto2Z.Text        = Racional.AString(punto2.Z);
                ventanagrafica.Escala = 0.85F;
                btIsometrica.PerformClick();
                // sbAngulox.Value = 30;
                //  sbAnguloY.Value = -25;
                //  sbAnguloZ.Value = 65;
            }


            if (!directa)
            {
                ventanagrafica.PintarPunto(punto1, 10, true, Color.Red);
                ventanagrafica.PintarPunto(punto2, 10, true, Color.GreenYellow);
                lbExplicacion.Text = " La distancia entre los dos puntos, es igual a la raiz cuadrada de la suma de los cuadrados de las diferencias de sus coordenadas respectivas. \nEs decir: Distancia = √ ( " + tbPunto1X.Text + " - " + tbPunto2X.Text + ")^2 + ( " + tbPunto1Y.Text + " - " + tbPunto2Y.Text + " )^2 + ( " + tbPunto1Z.Text + " - " + tbPunto2Z.Text + " )^2";
            }
            if (directa)
            {
                lbExplicacion.Text = " La distancia entre los puntos es: " + new Vector(punto1, punto2).ModuloDecimal().ToString();
                ventanagrafica.PintarVector(punto1, punto2, Color.CadetBlue, 5, true);
                btContinuar.Hide();
            }

            if (!defecto)
            {
                btAjustar.PerformClick();
                btIsometrica.PerformClick();
            }
        }
Example #6
0
        /// <summary>
        ///
        /// DIBUJA EL PLANO, EL PUNTO  Y INICIA/ LA EXPLICACION
        ///
        /// </summary>
        ///
        private void IniciarResolucion()
        {
            btDefecto.Hide();

            if (defecto)
            {
                this.Focus();
                btContinuar.Visible = true;
                this.AcceptButton   = this.btContinuar;
                paso++;
                //Vector perpendicular
                tbPunto1X.Text = "2";
                tbPunto1Y.Text = "6";
                tbPunto1Z.Text = "3";
                //Punto de paso
                tbPunto2X.Text = "15";
                tbPunto2Y.Text = "26";
                tbPunto2Z.Text = "10";
                // Punto del que se quiere encontrar la distancia al plano
                tbPunto3X.Text = "50";
                tbPunto3Y.Text = "60";
                tbPunto3Z.Text = "45";
            }

            // Mostrar los controles
            lbTituloAnguloX.Visible = true; btIsometrica.Visible = true;
            lbAnguloX.Visible       = true; btAlzado.Visible = true;
            sbAngulox.Visible       = true; btPerfil.Visible = true;
            lbTituloAnguloY.Visible = true; btPlanta.Visible = true;
            lbAnguloY.Visible       = true;
            sbAnguloY.Visible       = true;
            lbTituloAnguloZ.Visible = true;
            lbAnguloZ.Visible       = true;
            sbAnguloZ.Visible       = true;
            btZoomMas.Visible       = true;
            btZoomMenos.Visible     = true;
            lbZoomtitulo.Visible    = true;
            lbAjustar.Visible       = true;
            btAjustar.Visible       = true;
            pnZoom.Visible          = true;
            btAbajo.Visible         = true;
            btArriba.Visible        = true;
            btDerecha.Visible       = true;
            btIzquierda.Visible     = true;
            btCentrar.Visible       = true;
            btContinuar.Visible     = true;


            // Crear el vector perpendicular al plano
            perpendicular = new Vector(tbPunto1X.Text + " " + tbPunto1Y.Text + " " + tbPunto1Z.Text);
            // Crear el punto de paso del plano
            puntopasoplano = new Punto(tbPunto2X.Text + " " + tbPunto2Y.Text + " " + tbPunto2Z.Text);
            // Crear el punto del que se quiere encontrar la distancia al plano
            punto = new Punto(tbPunto3X.Text + " " + tbPunto3Y.Text + " " + tbPunto3Z.Text);
            // Crear el plano
            plano = new Plano(perpendicular, puntopasoplano);
            // Crear la recta perpendicular al plano y que pasa por el punto
            recta = new Recta(punto, plano.VectorPerpendicular);
            // Obtener el punto de interseccion de la recta con el plano
            puntointerseccion = plano.Interseccion(recta);

            // Punto oculto para establecer la escala
            Punto ficticio = plano.ADistanciaXY(35, 35);

            if (ficticio != null)
            {
                ventanagrafica.PintarVector(ficticio, ficticio, Color.Black, 1, false);
            }
            else
            {
                ficticio = new Punto("35 35 35");
                ventanagrafica.PintarVector(ficticio, ficticio, Color.Black, 1, false);
            }

            if (directa)
            {
                lbExplicacion.Hide();
            }

            lbExplicacion.Text = " La distancia entre el punto y el plano, es el módulo del vector que vá desde el punto inicial, al punto donde una recta perpendicular al plano y que pasa por el punto inicial, corta al plano.";

            // Calcular el tamaño del plano para que pase por el punto de interseccion con la recta perpendicular

            Racional dist = plano.PuntoDePaso.Distancia(puntointerseccion);

            int tamaño = (int)dist.ToDouble();

            if (tamaño == 0)
            {
                tamaño = 5;
            }

            // Pintar el plano
            ventanagrafica.PintarPlano(plano.VectorPerpendicular, puntointerseccion, 50 + tamaño, Color.Chartreuse);

            // Pintar el punto
            ventanagrafica.PintarPunto(punto, 10, true, Color.Coral);

            if (!directa)
            {
                btAjustar.PerformClick();
            }
            btIsometrica.PerformClick();

            if (directa)
            {
                ContinuarResolucion();
            }
            paso = 1;
        }
Example #7
0
        /// <summary>
        ///
        /// CONSTRUYE LOS DOS VECTORES A SUMAR O RESTAR SEGUN LOS DATOS INTRODUCIDOS EN LAS CAJAS
        /// DE LAS COMPONENTES Y LOS REPRESENTA EN PANTALLA
        ///
        /// </summary>
        ///
        private void IniciarResolucion()
        {
            // Mostrar los controles
            lbTituloAnguloX.Visible = true; btIsometrica.Visible = true;
            lbAnguloX.Visible       = true; btAlzado.Visible = true;
            sbAngulox.Visible       = true; btPerfil.Visible = true;
            lbTituloAnguloY.Visible = true; btPlanta.Visible = true;
            lbAnguloY.Visible       = true;
            sbAnguloY.Visible       = true;
            lbTituloAnguloZ.Visible = true;
            lbAnguloZ.Visible       = true;
            sbAnguloZ.Visible       = true;
            btZoomMas.Visible       = true;
            btZoomMenos.Visible     = true;
            lbZoomtitulo.Visible    = true;
            lbAjustar.Visible       = true;
            btAjustar.Visible       = true;
            pnZoom.Visible          = true;
            btAbajo.Visible         = true;
            btArriba.Visible        = true;
            btDerecha.Visible       = true;
            btIzquierda.Visible     = true;
            btCentrar.Visible       = true;
            btContinuar.Visible     = true;

            if (defecto)
            {
                punto1                = new Punto("26 10 25");
                tbPunto1X.Text        = Racional.AString(punto1.X);
                tbPunto1Y.Text        = Racional.AString(punto1.Y);
                tbPunto1Z.Text        = Racional.AString(punto1.Z);
                punto2                = new Punto("14 30 5");
                tbPunto2X.Text        = Racional.AString(punto2.X);
                tbPunto2Y.Text        = Racional.AString(punto2.Y);
                tbPunto2Z.Text        = Racional.AString(punto2.Z);
                ventanagrafica.Escala = 1.3F;
            }

            vector1 = new Vector(tbPunto1X.Text + " " + tbPunto1Y.Text + " " + tbPunto1Z.Text);
            vector2 = new Vector(tbPunto2X.Text + " " + tbPunto2Y.Text + " " + tbPunto2Z.Text);
            punto1  = new Punto(tbPunto1X.Text + " " + tbPunto1Y.Text + " " + tbPunto1Z.Text);
            punto2  = new Punto(tbPunto2X.Text + " " + tbPunto2Y.Text + " " + tbPunto2Z.Text);
            // Pintar los vectores
            ventanagrafica.PintarVector(new Punto("0 0 0"), new Punto(tbPunto1X.Text + " " + tbPunto1Y.Text + " " + tbPunto1Z.Text), Color.DarkOrange, 7, true);
            ventanagrafica.PintarVector(new Punto("0 0 0"), new Punto(tbPunto2X.Text + " " + tbPunto2Y.Text + " " + tbPunto2Z.Text), Color.SlateBlue, 7, true);
            btIsometrica.PerformClick();
            if (!defecto)
            {
                btAjustar.PerformClick();
            }
            if (!directa)
            {
                lbExplicacion.Text = " El ángulo entre dos vectores θ, se mide sobre el plano que los contiene a ambos.\n La fórmula para calcularlo es: cos θ = ( U * V ) / ( |U| * |V| ).\n Esta fórmula se extrae de la ley de los cosenos: | W |² = | U |² + |V|² - 2 |U| * |V| * cos θ.  Pulse el botón [ Demostración ] para ver como se extrae. ";
            }
            // Pintar el plano entre los vectores
            Punto final1 = new Punto(new Racional[] { vector1.Componentes[0] / 2, vector1.Componentes[1] / 2, vector1.Componentes[2] / 2 });
            Punto final2 = new Punto(new Racional[] { vector2.Componentes[0] / 2, vector2.Componentes[1] / 2, vector2.Componentes[2] / 2 });

            ventanagrafica.PintarSuperficie(new Punto[] { final1, final2, new Punto("0 0 0") }, Color.Chartreuse, false);
            //Pintar las letras que identifican cada vector
            Punto  situacionU = Punto.PuntoMedio(new Punto("0 0 0"), new Punto(vector1.Componentes));
            PointF finalv1    = ventanagrafica.PuntoAPoint(new Punto(vector1.Componentes));
            double pendiente  = finalv1.Y / finalv1.X;

            situacionU.Coordenadas[1] -= 1;
            situacionU.Coordenadas[2] -= 1;
            Punto situacionV = Punto.PuntoMedio(new Punto("0 0 0"), new Punto(vector2.Componentes));

            situacionV.Coordenadas[1] -= 1;
            situacionV.Coordenadas[2] -= 1;
            ventanagrafica.PintarString(situacionU, Color.Orange, 14, "U");
            ventanagrafica.PintarString(situacionV, Color.SlateBlue, 14, "V");
            // Mover las etiquetas para dejar sitio a los signos de multiplicar y el desarrollo de las operaciones
            label35.Location   = new Point(label35.Location.X, label35.Location.Y - 15);
            label36.Location   = new Point(label36.Location.X, label36.Location.Y - 15);
            label37.Location   = new Point(label37.Location.X, label37.Location.Y - 15);
            lbRotuloA.Location = new Point(lbRotuloA.Location.X, lbRotuloA.Location.Y - 15);
            tbPunto1X.Location = new Point(tbPunto1X.Location.X, tbPunto1X.Location.Y - 15);
            tbPunto1Y.Location = new Point(tbPunto1Y.Location.X, tbPunto1Y.Location.Y - 15);
            tbPunto1Z.Location = new Point(tbPunto1Z.Location.X, tbPunto1Z.Location.Y - 15);
            // Mostrar las etiquetas con los signos
            label1.Show();
            label1.Text      = "*";
            label1.BackColor = Color.Transparent;
            label1.Font      = new Font(label1.Font.FontFamily, 15, FontStyle.Bold);
            pnDatos.Controls.Add(label1);
            label1.Location = new Point(tbPunto1X.Location.X + (tbPunto1X.Width / 2) - 5, (tbPunto1X.Location.Y + tbPunto2X.Location.Y) / 2 + 2);

            label2.Show();
            label2.Text      = "*";
            label2.BackColor = Color.Transparent;
            label2.Font      = new Font(label1.Font.FontFamily, 15, FontStyle.Bold);
            pnDatos.Controls.Add(label2);
            label2.Location = new Point(tbPunto1Y.Location.X + (tbPunto1Y.Width / 2) - 5, label1.Location.Y);

            label3.Show();
            label3.Text      = "*";
            label3.BackColor = Color.Transparent;
            label3.Font      = new Font(label1.Font.FontFamily, 15, FontStyle.Bold);
            pnDatos.Controls.Add(label3);
            label3.Location = new Point(tbPunto1Z.Location.X + (tbPunto1Z.Width / 2) - 5, label1.Location.Y);

            label4.Show();
            label4.Text = Racional.AString(vector1.Componentes[0] * vector2.Componentes[0]);
            label4.Font = new Font(label1.Font.FontFamily, 10, FontStyle.Bold);
            pnDatos.Controls.Add(label4);
            label4.Location  = new Point(tbPunto1X.Location.X, tbPunto2X.Location.Y + tbPunto2X.Height);
            label4.BackColor = Color.Transparent;

            label5.Show();
            label5.BackColor = Color.Transparent;
            label5.Text      = " + ";
            label5.Font      = new Font(label1.Font.FontFamily, 10, FontStyle.Bold);
            pnDatos.Controls.Add(label5);
            label5.Location  = new Point(tbPunto1X.Location.X + tbPunto2X.Width, label4.Location.Y);
            label4.BackColor = Color.Transparent;

            label6.Show();
            label6.Text = Racional.AString(vector1.Componentes[1] * vector2.Componentes[1]);
            label6.Font = new Font(label1.Font.FontFamily, 10, FontStyle.Bold);
            pnDatos.Controls.Add(label6);
            label6.Location  = new Point(tbPunto1Y.Location.X, label5.Location.Y);
            label6.BackColor = Color.Transparent;

            label7.Show();
            label7.BackColor = Color.Transparent;
            label7.Text      = " + ";
            label7.Font      = new Font(label1.Font.FontFamily, 10, FontStyle.Bold);
            pnDatos.Controls.Add(label7);
            label7.Location  = new Point(tbPunto1Y.Location.X + tbPunto2X.Width, label6.Location.Y);
            label7.BackColor = Color.Transparent;

            label8.Show();
            label8.Text = Racional.AString(vector1.Componentes[2] * vector2.Componentes[2]);
            label8.Font = new Font(label1.Font.FontFamily, 10, FontStyle.Bold);
            pnDatos.Controls.Add(label8);
            label8.Location  = new Point(tbPunto1Z.Location.X, label5.Location.Y);
            label8.BackColor = Color.Transparent;

            label9.Show();
            label9.BackColor = Color.Chartreuse;
            label9.Text      = " = " + Racional.AString(vector1 * vector2);
            label9.Font      = new Font(label1.Font.FontFamily, 13, FontStyle.Bold);
            label9.Location  = new Point(pnDatos.Location.X + pnDatos.Width, pnDatos.Location.Y + pnDatos.Height - 21);

            label10.Show();
            label10.Font      = new Font(label8.Font.FontFamily, 9, FontStyle.Underline);
            label10.BackColor = Color.Transparent;
            label10.Text      = "Producto punto (U*V): ";
            pnDatos.Controls.Add(label10);
            label10.Location = new Point(label35.Location.X - 130, label8.Location.Y);

            if (!directa)
            {
                btDemostracion.Show();
            }
            // Mostrar los modulos de los vectores
            label11.Show();
            label11.Font      = new Font(label10.Font.FontFamily, 10, FontStyle.Bold);
            label11.Location  = new Point(btContinuar.Location.X, btContinuar.Location.Y + btContinuar.Height + 5);
            label11.BackColor = Color.Transparent;
            label11.Text      = "Módulo del vector 1 ( | U | ): ";

            label12.Show();
            label12.Font      = new Font(label11.Font.FontFamily, 13, FontStyle.Bold);
            label12.Location  = new Point(label11.Location.X + label11.Width, label11.Location.Y);
            label12.BackColor = Color.DarkOrange;
            label12.Text      = Math.Round(vector1.ModuloDecimal(), 2).ToString();

            label13.Show();
            label13.Font      = new Font(label10.Font.FontFamily, 10, FontStyle.Bold);
            label13.Location  = new Point(btContinuar.Location.X, label11.Location.Y + label11.Height + 10);
            label13.BackColor = Color.Transparent;
            label13.Text      = "Módulo del vector 2 ( | V | ): ";

            label14.Show();
            label14.Font      = new Font(label11.Font.FontFamily, 13, FontStyle.Bold);
            label14.Location  = new Point(label13.Location.X + label13.Width, label13.Location.Y);
            label14.BackColor = Color.SlateBlue;
            label14.Text      = Math.Round(vector2.ModuloDecimal(), 2).ToString();

            // Mostrar la formula del angulo entre vectores
            label15.Show();
            label15.Font      = label14.Font;
            label15.Location  = new Point(btContinuar.Location.X, label14.Location.Y + label14.Height + 5);
            label15.BackColor = Color.LightYellow;
            label15.Text      = "           U * V " + "\ncos Φ = ----------" + "\n             |U| * |V|";

            if (directa)
            {
                paso++;
                lbExplicacion.Hide();
                Finalizar();
            }
        }