mirror of
https://github.com/3b1b/manim.git
synced 2025-08-21 05:44:04 +00:00
Gives fourier graphs created with FFT and underlying function attribute
This commit is contained in:
parent
c55287220c
commit
2c5c651e99
1 changed files with 7 additions and 0 deletions
|
@ -59,6 +59,13 @@ def get_fourier_graph(
|
|||
for x, y in zip(frequencies, fft_output[:n_samples//2])
|
||||
])
|
||||
graph.highlight(color)
|
||||
f_min, f_max = [
|
||||
axes.x_axis.point_to_number(graph.points[i])
|
||||
for i in 0, -1
|
||||
]
|
||||
graph.underlying_function = lambda f : axes.y_axis.point_to_number(
|
||||
graph.point_from_proportion((f - f_min)/(f_max - f_min))
|
||||
)
|
||||
return graph
|
||||
|
||||
def get_fourier_transform(
|
||||
|
|
Loading…
Add table
Reference in a new issue