x2XcarleX2x commited on
Commit
bb43153
·
verified ·
1 Parent(s): 9919d56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -50,7 +50,7 @@ def motor_da_simulacao_infinita(angulo_camera: int):
50
 
51
  novos_pontos_rastro = list(zip(x_ciclo, y_ciclo, z_ciclo))
52
  historico_rastro.extend(novos_pontos_rastro)
53
- max_rastro = 4
54
  historico_rastro = historico_rastro[-max_rastro:]
55
 
56
  tamanho_eco = 8
@@ -72,8 +72,8 @@ def motor_da_simulacao_infinita(angulo_camera: int):
72
  ax.set_xlim(-32, 32); ax.set_ylim(-32, 32); ax.set_zlim(-32, 32)
73
  ax.set_xticklabels([]); ax.set_yticklabels([]); ax.set_zticklabels([])
74
 
75
- ax.scatter(*ponto_a, s=160, c='lime', alpha=0.8)
76
- ax.scatter(*ponto_b, s=160, c='red', marker='X', alpha=0.2)
77
 
78
  indice_global_frame = len(historico_rastro) - len(x_ciclo) + frame
79
  ax.plot(rastro_np[:indice_global_frame+1, 0], rastro_np[:indice_global_frame+1, 1], rastro_np[:indice_global_frame+1, 2], '-', color='#ff4500', linewidth=4, alpha=0.6)
@@ -81,7 +81,7 @@ def motor_da_simulacao_infinita(angulo_camera: int):
81
  ax.plot([x_ciclo[frame]], [y_ciclo[frame]], [z_ciclo[frame]], 'o', color='#ff4500', markersize=8, markeredgecolor='white')
82
 
83
  info_texto = f"Ciclo: {ciclo_num}\nAlvo: {np.round(ponto_b, 1)}"
84
- ax.text2D(0.04, 0.88, info_texto, transform=ax.transAxes, color='white', fontsize=10)
85
 
86
  yield fig
87
  time.sleep(0.008)
 
50
 
51
  novos_pontos_rastro = list(zip(x_ciclo, y_ciclo, z_ciclo))
52
  historico_rastro.extend(novos_pontos_rastro)
53
+ max_rastro = 8
54
  historico_rastro = historico_rastro[-max_rastro:]
55
 
56
  tamanho_eco = 8
 
72
  ax.set_xlim(-32, 32); ax.set_ylim(-32, 32); ax.set_zlim(-32, 32)
73
  ax.set_xticklabels([]); ax.set_yticklabels([]); ax.set_zticklabels([])
74
 
75
+ ax.scatter(*ponto_a, s=320, c='lime', alpha=0.4)
76
+ ax.scatter(*ponto_b, s=320, c='red', marker='X', alpha=0.8)
77
 
78
  indice_global_frame = len(historico_rastro) - len(x_ciclo) + frame
79
  ax.plot(rastro_np[:indice_global_frame+1, 0], rastro_np[:indice_global_frame+1, 1], rastro_np[:indice_global_frame+1, 2], '-', color='#ff4500', linewidth=4, alpha=0.6)
 
81
  ax.plot([x_ciclo[frame]], [y_ciclo[frame]], [z_ciclo[frame]], 'o', color='#ff4500', markersize=8, markeredgecolor='white')
82
 
83
  info_texto = f"Ciclo: {ciclo_num}\nAlvo: {np.round(ponto_b, 1)}"
84
+ ax.text2D(0.04, 0.88, info_texto, transform=ax.transAxes, color='white', fontsize=12)
85
 
86
  yield fig
87
  time.sleep(0.008)