3b1b / 3b1b/videos

VectorField not properly instantiated?

Abierto
#117 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
11.2k
Forks
2.1k
Merge medio
5 h 49 min
PR fusionados (30 d)
3

Descripción

In [_2024/holograms/diffraction.py](https://github.com/3b1b/videos/blob/master/_2024/holograms/diffraction.py), there is an instance of VectorField that is missing the coordinate_system argument on line 400:
```
linear_field = VectorField(field_func, sample_points=wave_line.get_points()[::4], max_vect_len=2.0)
```

Is this an error or is the code supposed to run normally?

Error message:
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[3], line 7
4 result[:, 1] = wave_amp_tracker.get_value() * wave.wave_func(points)
5 return result
----> 7 linear_field = VectorField(field_func, sample_points=wave_line.get_points()[::4], max_vect_len=2.0)
wave_line =
8 linear_field.always.update_vectors()
9 linear_field.set_stroke(WHITE, width=1.5, opacity=0.75)

TypeError: VectorField.__init__() missing 1 required positional argument: 'coordinate_system'
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.