-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
executable file
·34 lines (20 loc) · 889 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import eel
import fourier
import cmath
# Set web files folder
eel.init('web')
def load_path():
sample_data = []
for i in range(-2, 3):
for t in range(0, 25):
#sample_data.append(100*complex(cmath.cos(2*cmath.pi * t/100).real, cmath.sin(2*cmath.pi * t/100).real))
sample_data.append(complex(i*100 + t*4, t*4))
for t in range(0, 25):
#sample_data.append(100*complex(cmath.cos(2*cmath.pi * t/100).real, cmath.sin(2*cmath.pi * t/100).real))
sample_data.append(complex((i+1) * 100, 100-t*4))
return sample_data
# sample_data = [100j, 100j, 100j, 100j, 100j, -100j, -100j, -100j, -100j, -100j]
coeff = fourier.discrete_fourier_transform(load_path())
#data = fourier.inverse_fourier_transform(coeff)
eel.draw_fourier_transform(coeff)
eel.start('index.html', mode='electron', cmdline_args=['electron'])