FORMULAS RESUELTAS DEL TIRO PARABOLICO
Página 1 de 1.
FORMULAS RESUELTAS DEL TIRO PARABOLICO
ESTE ES EL CODIGO PARA REALIZAR LOS CALCULOS DE LA VELOCIDAD EN YE Y EN X.
TIENEN QUE UTILIZAR DOS CONTROLES TEXTBOX (TEXT1 PARA EL INGRESO DE EL ANGULO Y TEXT2 PARA EL INGRESO DE LA VELOCIDAD) , BOTON ( QUE LLEVARA POR NOMBRE cmdLanzar DONDE SE INGRESAR TODO EL CODIGO QUE A CONTINUACION OS DEJO), 14 CONTROLES LABEL( label1 donde ingresaremos un texto de referencia al angulo, label 2 para la velocidad, label3 donde mostraremos la velocidad incial en X, label4 donde mostraremos la velocidad inicial en Y ,label5 donde mostraremos el tiempo de subida del proyectil, label6 donde mostraremos el tiempo total recorrido por el proyectil, label7 donde mostraremos la distancia total recorrida, label8 donde mostraremos la altura maxima y el resto de los controles label solo son rotulos para especificar todo lo anterior) copien y peguen el codigo dentro del boton cmdLanzar.....
Private Sub cmdLanzar_Click()
If text1.Text > 90 Then text1.Text = 90
If text2.Text > 150 Then text2.Text = 150
'cmdLanzar.Enabled = False
angulo = Val(text1.Text)
vel = Val(text2.Text)
pi = 3.141592
viento = 0
gravedad = 9.8
angleChk = angle#: If playerNum = 2 Then angleChk = 180 - angleChk
angulo = angulo / 180 * pi
Vox = Cos(angulo) * vel
Label3.Caption = Format(Vox, "###.##") & " mts/seg"
Voy = Sin(angulo) * vel
Label4.Caption = Format(Voy, "###.##") & " mts/seg"
tiemposubida = (-Voy) / (-gravedad)
Label5.Caption = Format(tiemposubida, "###.##") & " segundos"
ttotal = tiemposubida * 2
Label6.Caption = Format(ttotal, "###.##") & " segundos"
distancia = Vox * ttotal
Label7.Caption = Format(distancia, "###.##") & " metros"
hmax = ((Voy) * (tiemposubida)) - ((0.5) * (gravedad) * (tiemposubida ^ 2))
Label8.Caption = Format(hmax, "###.##") & " metros"
End Sub
TIENEN QUE UTILIZAR DOS CONTROLES TEXTBOX (TEXT1 PARA EL INGRESO DE EL ANGULO Y TEXT2 PARA EL INGRESO DE LA VELOCIDAD) , BOTON ( QUE LLEVARA POR NOMBRE cmdLanzar DONDE SE INGRESAR TODO EL CODIGO QUE A CONTINUACION OS DEJO), 14 CONTROLES LABEL( label1 donde ingresaremos un texto de referencia al angulo, label 2 para la velocidad, label3 donde mostraremos la velocidad incial en X, label4 donde mostraremos la velocidad inicial en Y ,label5 donde mostraremos el tiempo de subida del proyectil, label6 donde mostraremos el tiempo total recorrido por el proyectil, label7 donde mostraremos la distancia total recorrida, label8 donde mostraremos la altura maxima y el resto de los controles label solo son rotulos para especificar todo lo anterior) copien y peguen el codigo dentro del boton cmdLanzar.....
Private Sub cmdLanzar_Click()
If text1.Text > 90 Then text1.Text = 90
If text2.Text > 150 Then text2.Text = 150
'cmdLanzar.Enabled = False
angulo = Val(text1.Text)
vel = Val(text2.Text)
pi = 3.141592
viento = 0
gravedad = 9.8
angleChk = angle#: If playerNum = 2 Then angleChk = 180 - angleChk
angulo = angulo / 180 * pi
Vox = Cos(angulo) * vel
Label3.Caption = Format(Vox, "###.##") & " mts/seg"
Voy = Sin(angulo) * vel
Label4.Caption = Format(Voy, "###.##") & " mts/seg"
tiemposubida = (-Voy) / (-gravedad)
Label5.Caption = Format(tiemposubida, "###.##") & " segundos"
ttotal = tiemposubida * 2
Label6.Caption = Format(ttotal, "###.##") & " segundos"
distancia = Vox * ttotal
Label7.Caption = Format(distancia, "###.##") & " metros"
hmax = ((Voy) * (tiemposubida)) - ((0.5) * (gravedad) * (tiemposubida ^ 2))
Label8.Caption = Format(hmax, "###.##") & " metros"
End Sub
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.
|
|
Jue Feb 03, 2011 8:06 am por Admin
» COMO HACER UNA CARPETA INVISIBLE
Vie Ago 06, 2010 6:16 am por JOSE CARDONA
» pasos para crear una consulta en access en vista de diseño
Mar Ago 03, 2010 6:52 am por Admin
» como crear un formulario en acces
Mar Ago 03, 2010 6:45 am por Admin
» Visual Bacic
Lun Ago 02, 2010 7:27 am por Admin
» como hacer tus lentes 3d
Lun Jul 26, 2010 5:06 am por Admin
» buena pagina para proyectitos
Mar Jun 01, 2010 5:47 am por invisible
» problema con el semaforo
Lun Mayo 31, 2010 5:19 am por invisible
» COMO HACER UN SEMAFORO EN VISUAL BASIC
Mar Mayo 25, 2010 7:03 am por Admin