Parabola

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Parabola as PDF for free.

More details

  • Words: 104
  • Pages: 1
from visual import * #tiro parabolico #el objetivo del programa es simular una situacion de tiro parabolico #en funcion del angulo y la velocidad scene.width = 800 scene.height = 600 scene.autoscale = 0 scene.center = (5,5,0) scene.range= (50,50,0) ang = input("Da el angulo deseado: ") vel = input("Y la velocidad: ") bala = sphere(pos=(0,0,0), radius=1, color=color.green) suelo = box(pos=(5,-1,0),size=(70,1,0),color=color.blue) tiempo=0 dt=.01 g = 9.81 Vx = vel*cos((ang*3.14159264)/180) Vy = vel*sin((ang*3.14159264)/180) #Recordemos que la componente x de la velocidad es Vx=V0*cos(ang) #la componente y es Vy=V0*sen(ang)-gt #Dy=Vot acabado=False while not acabado: rate(50) tiempo += dt bala.pos = vector(Vx*tiempo,(Vy*tiempo)-(.5*g*tiempo**2),0) if ((Vy*tiempo)-(.5*g*tiempo**2)) <= 0: acabado = True

Related Documents

Parabola
June 2020 21
Parabola
November 2019 43
Parabola
November 2019 36
Parabola
October 2019 31
Parabola
May 2020 15
Parabola
November 2019 36