MOUVEMENT BALISTIQUE SANS FROTTEMENT

In [1]:
%display latex
In [2]:
g=10;vo=10;alpha=pi/2; 
var('t')
x=function('x')(t);y=function('y')(t)
eqx=diff(x,t,2)==0;eqy=diff(y,t,2)==-g;eqx,eqy
Out[2]:
In [3]:
solx=[]
for i in [1..9]:
    solx.append(desolve(eqx,x,ics=[0,0,vo*cos(0.1*i*alpha)]))
In [4]:
solx
Out[4]:
In [5]:
soly=[]
for i in [1..9]:
    soly.append(desolve(eqy,y,ics=[0,0,vo*sin(0.1*i*alpha)]))
In [6]:
soly
Out[6]:
In [7]:
graph=Graphics()
for i in range(9):
    graph +=parametric_plot((solx[i],soly[i]),(t,0,2*vo*sin(0.1*(i+1)*alpha)/g),plot_points=500,aspect_ratio=1,
                            axes_labels=[r'$x\ (\rm{m})$',r'$y\ (\rm{m})$'], color=hue(i/9))
In [8]:
show(graph)
In [9]:
graph.save('balistique1.pdf')


Tracé de la parabole de sûreté:

In [10]:
var('X')
Y=-0.5*(g/vo^2)*X^2+vo^2/(2*g);Y
Out[10]:
In [11]:
graphp=plot(Y,X,0,vo^2/g,color='purple',thickness=2, axes_labels=[r'$x\ (\rm{m})$',r'$y\ (\rm{m})$'])
show(graph+graphp)
In [42]:
(graph+graphp).save('balistique1_surete.pdf')