Public feed #600753

Tiro parabolico

public text v1 · immutable
Raw Edit
·published 2007-07-03 02:09 UTC
rendered paste body
window_coordinates(-100,-100,100,100)
create_line(0,-100,0,100,'red')
create_line(-100,0,100,0,'red')
a = -10
m = 50
v = 0
t = 0
dt = 0.0001
i = 0
p = 0
x = 0
vx = 4
y = 0
vy = 40

while y>=0:
  t+=dt
  xa = x
  va = v
  y+=vy*dt
  x+=vx*dt
  vy+=a*dt
  p = create_filled_circle(x,y,1.5,'black','cyan')
  erase(p)