last ubuntu
No files matched your search
@@ -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()
|
||||
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
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()
|
||||
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 37 KiB |