Catégories : Tous - vectors - operations - angles - coordinates

par Francisco Cisneros Il y a 3 années

135

SWITCH DE LOS VECTORES

The text outlines a program designed to manage vector transformations and conversions between different coordinate systems. It allows users to select from several operations, including converting vectors from rectangular to polar coordinates, polar to rectangular coordinates, and geometric to polar coordinates, among others.

SWITCH DE LOS VECTORES

SWITCH DE LOS VECTORES

case "4":

theta=90-alpha;
System.out.println("EL ANGULO ES:"+theta);
System.out.println("GEOMETRICAS A POLARES");
System.out.println("INGRESE EL ANGULO"); alpha=dato.nextDouble();

case "2":

y=(Math.sin(theta_t))*m;
System.out.println("Y ES:"+y);
x=(Math.cos(theta_t))*m;
System.out.println("X ES:"+x);
theta_t=(Math.PI*theta)/(180);
System.out.println("POLARES A RECTANGULARES");

switch(opcion){

opcion=dato.nextLine();

System.out.println("MENU");

System.out.println("4) GEOMETRICAS A POLARES");
case 4
System.out.println("3) POLARES A GEOMETRICAS");
case 3
System.out.println("2) POLARES A RECTANGULARES");
case 2
System.out.println("1) RECTANGULARES A POLARES");
case 1

String

opcion

default:

}
System.out.println("INGRESE UN NUMERO VALIDO");
System.out.println("ERROR");

case "3":

alpha=90-theta;
System.out.println("EL MODULO ES:"+m)
System.out.println("EL ANGULO ES:"+alpha);
System.out.println("POLARES A GEOMETRICAS");
System.out.println("INGRESE EL ANGULO"); theta=dato.nextDouble();
System.out.println("INGRESE EL MODULO"); m=dato.nextDouble();

case "1":

break;
theta_t=(theta*180)/(Math.PI);
System.out.println("EL ANGULO ES:"+theta_t);
theta=Math.atan(y/x);
m=Math.sqrt((Math.pow(x,2)+Math.pow(y,2)));
System.out.println("EL MODULO ES:"+m);
System.out.println("RECTANGULARES A POLARES");
System.out.println("INGRESE Y"); y=dato.nextDouble();
System.out.println("INGRESE X"); x=dato.nextDouble();

System.out.println("ESCOJA EL NUMERO DE LA OPERACION A REALIZAR");

System.out.println("UTILIZAR VECTORES SOLO DEL PRIMER CUADRANTE");

Scanner dato = new Scanner(System.in);

System.out.println("CONVERSION DE VECTORES");

double

alpha
theta
theta_t
m
x
y