| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 
 |  
from math import*
import math
 
 
g = 9.81
 
v= 22.0
x0= 4.0 #Distance x en m
i = 0.01
t=0.5
div = 10000
 
 
#am=degrees((math.pi))/4
am=math.pi/4
 
 
p = pow(v,2)*(sin(2*am))/g
print("portee max:",p)
print("angle:",degrees(sin(math.pi)))
 
 
if p<x0:
     print ("impossible")
else:
     t = math.pi/div
     x = pow(v,2)*(sin(2*(am-t)))/g
 
     while x - i > x0:
          print("distance ", x, "  angle ", degrees(am-t))
 
          t += math.pi/div
          x = pow(v,2)*(sin(2*(am-t)))/g
 
print("distance ", x, "  angle ", degrees(am-t)) | 
Partager