Librería para el curso Física con Apoyo Computacional de la Facultad de Ingeniería (UdelaR)
Project description
fing_fac
Librería desarrollada para el curso Física con Apoyo Computacional (FAC) de la Facultad de Ingeniería (Universidad de la República), por Mateo Dutra.
Descripción
Esta librería permite visualizar de forma interactiva el movimiento de uno o dos objetos a partir de listas de tiempo, posición, velocidad y aceleración.
Incluye:
- simulaciones del movimiento en una dimensión;
- representación gráfica de las magnitudes cinemáticas;
- animaciones del movimiento de dos partículas en el plano.
Funciones disponibles
-
simular_pos(t, x)
Simula el movimiento de una partícula a partir de su posición. -
simular_vel_y_pos(t, v, x)
Simula el movimiento mostrando simultáneamente la velocidad y la posición. -
simular_a_vel_y_pos(t, a, v, x)
Simula el movimiento mostrando aceleración, velocidad y posición. -
animar_particulas(t, x1, y1, x2, y2)
Realiza una animación del movimiento de dos partículas en el plano a partir de las listas de tiempo y de sus coordenadas.
Ejemplo de uso
from fing_fac import simular_a_vel_y_pos
t_i = 0 # Tiempo inicial
t_f = 10 # Tiempo final
dt = 0.15 # Paso de tiempo
x_i = -90 # Posición inicial
v_i = 40 # Velocidad inicial
a_i = -8 # Aceleración
t = [t_i] # Lista de tiempos
v = [v_i] # Lista de velocidades
x = [x_i] # Lista de posiciones
a = [a_i] # Lista de aceleraciones
while t[-1] < t_f:
t.append(t[-1] + dt)
a.append(a[-1])
v.append(v[-1] + a[-1]*dt)
x.append(x[-1] + v[-2]*dt)
simular_a_vel_y_pos(t, a, v, x)
Animación de dos partículas
from fing_fac import animar_particulas
t = [0, 1, 2, 3, 4]
x1 = [0, 1, 2, 3, 4]
y1 = [0, 1, 2, 3, 4]
x2 = [4, 4, 4, 4, 4]
y2 = [4, 3, 2, 1, 0]
animar_particulas(t, x1, y1, x2, y2)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fing_fac-1.0.4.tar.gz.
File metadata
- Download URL: fing_fac-1.0.4.tar.gz
- Upload date:
- Size: 378.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f63ad9c85d398f69c899ebb096fd7b5a85a59f7dc0ce60e594b030787b09852
|
|
| MD5 |
93423ab961001fb17f090e55cff46463
|
|
| BLAKE2b-256 |
374486ac18c89b903dc71ed211e38a38452f4fba13d43780b838c3e86047f11f
|
File details
Details for the file fing_fac-1.0.4-py3-none-any.whl.
File metadata
- Download URL: fing_fac-1.0.4-py3-none-any.whl
- Upload date:
- Size: 376.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c7dba8ad0883af5faac5555be1d59b1dc571933945e6bacad25516000267e52
|
|
| MD5 |
8f8ded7b24392c60b7e2b9d996e18987
|
|
| BLAKE2b-256 |
3eb2db478825e5672c194881f7684e8b11bee664de77dffc9cb151b90209b0c4
|