last ubuntu
@@ -31,15 +31,27 @@ def position(fposition):
|
||||
|
||||
xxold = xxbase.copy()
|
||||
|
||||
while(t<tf):
|
||||
plt.figure(1,figsize=[16,9])
|
||||
plt.clf()
|
||||
plt.xlim([-1,10])
|
||||
while(t<=tf):
|
||||
plt.figure(1,figsize=[12,5])
|
||||
# plt.clf()
|
||||
plt.xlim([-1,30])
|
||||
plt.ylim([-1, 21])
|
||||
xx = position(xxold)
|
||||
color = ['#ff0000', '#ff5300', '#ffa500', '#ffd200', '#ffff00', '#80c000', '#008000', '#004080', '#0000ff', '#2600c1', '#4b0082']
|
||||
plt.scatter(xx, y, c=color)
|
||||
|
||||
# plt.plot([0,20],[t, t], color='k', linestyle='-', linewidth=1)
|
||||
|
||||
plt.scatter(xx, np.linspace(t, t, 11), c=color)
|
||||
|
||||
|
||||
plt.xlabel('distance w en m', )
|
||||
plt.ylabel('temps en s')
|
||||
# plt.title("Modélisation de l'évolution de la distance entre les voitures\n\nau temps t = " + str(t) + 's')
|
||||
|
||||
|
||||
plt.draw()
|
||||
# plt.savefig(str(t)+'.png')
|
||||
if t == 20:
|
||||
plt.savefig('test/model/frame_' + str(t)+'.png')
|
||||
plt.pause(0.2)
|
||||
t += dt
|
||||
xxold = xx.copy()
|
||||
xxold = xx.copy()
|
||||
BIN
test/model/frame_20.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
test/model/frame_20_.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
test/model/frame_20_stryied.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
test/phi(ww).png
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 12 KiB |
@@ -5,7 +5,7 @@ from colour import Color
|
||||
|
||||
t0 = 0
|
||||
tf = 100
|
||||
dt = 0.5
|
||||
dt = 0.25
|
||||
t = t0
|
||||
|
||||
nbv = 20
|
||||
@@ -45,13 +45,18 @@ def position(fposition, newv):
|
||||
xxold = xxbase.copy()
|
||||
|
||||
while(t < tf):
|
||||
plt.figure(1, figsize=[16, 9])
|
||||
plt.figure(1, figsize=[12, 16])
|
||||
plt.clf()
|
||||
|
||||
nb = 360
|
||||
r = np.linspace(1, 1, nb)
|
||||
theta = np.linspace(0, 2 * np.pi, nb)
|
||||
|
||||
ax = plt.subplot(111, polar=True)
|
||||
|
||||
ax.set_xticklabels([])
|
||||
ax.set_yticklabels([])
|
||||
|
||||
plt.polar(theta, r, alpha=0)
|
||||
|
||||
dst = distances(xxold)
|
||||
@@ -61,8 +66,12 @@ while(t < tf):
|
||||
|
||||
plt.scatter(xx/10 * np.pi, y, c=colors)
|
||||
|
||||
plt.title('Vitesse maximale : ' + str(U) + ' m/s\ndistance minimale entre deux voitures : ' + str(Wm) + ' m\nnombre de voitures : ' + str(nbv))
|
||||
# plt.title("Modélisation de l'évolution de la distance entre les voitures (périodique)\n\nnombre de voiture : "+ str(nbv) +"\n\nau temps t = " + str(t) + 's\n')
|
||||
plt.grid(False)
|
||||
|
||||
plt.draw()
|
||||
plt.savefig('test/polaired_nbv=20/frame_' + str(t)+'.png')
|
||||
plt.pause(0.00001)
|
||||
t += dt
|
||||
|
||||
xxold = xx.copy()
|
||||
BIN
test/polaired_nbv=20/frame_0.25.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
test/polaired_nbv=20/frame_0.5.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
test/polaired_nbv=20/frame_0.75.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
test/polaired_nbv=20/frame_0.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
test/polaired_nbv=20/frame_1.0.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
test/polaired_nbv=20/frame_1.25.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
test/polaired_nbv=20/frame_1.5.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
test/polaired_nbv=20/frame_1.75.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
test/polaired_nbv=20/frame_10.0.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
test/polaired_nbv=20/frame_10.25.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
test/polaired_nbv=20/frame_10.5.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
test/polaired_nbv=20/frame_10.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_11.0.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
test/polaired_nbv=20/frame_11.25.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
test/polaired_nbv=20/frame_11.5.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
test/polaired_nbv=20/frame_11.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_12.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_12.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_12.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_12.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_13.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_13.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_13.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_13.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_14.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_14.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_14.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_14.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_15.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_15.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_15.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_15.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_16.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_16.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_16.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_16.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_17.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_17.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_17.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_17.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_18.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_18.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_18.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_18.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_19.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_19.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_19.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_19.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_2.0.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
test/polaired_nbv=20/frame_2.25.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
test/polaired_nbv=20/frame_2.5.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
test/polaired_nbv=20/frame_2.75.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
test/polaired_nbv=20/frame_20.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_20.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_20.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_20.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_21.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_21.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_21.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_21.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_22.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_22.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_22.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_22.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_23.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_23.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_23.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_23.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_24.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_24.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_24.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_24.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_25.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_25.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_25.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_25.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_26.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_26.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_26.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_26.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_27.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_27.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_27.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_27.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_28.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_28.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_28.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_28.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_29.0.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_29.25.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_29.5.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_29.75.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
test/polaired_nbv=20/frame_3.0.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
test/polaired_nbv=20/frame_3.25.png
Normal file
|
After Width: | Height: | Size: 37 KiB |