This question is inspired by the following video:


I own a sign, a drawing of a square with 200 points in total:

import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import quad, quad_vec


x = list(np.linspace(-np.pi, np.pi, POINTS_EACH_SIDE )) + [np.pi] * POINTS_EACH_SIDE + list(np.linspace(np.pi, -np.pi, POINTS_EACH_SIDE )) + [-np.pi] * POINTS_EACH_SIDE 
y = [np.pi] * POINTS_EACH_SIDE + list(np.linspace(np.pi, -np.pi, POINTS_EACH_SIDE )) + [-np.pi] * POINTS_EACH_SIDE + list(np.linspace(-np.pi, np.pi, POINTS_EACH_SIDE ))
t_list = np.linspace(0, 2*np.pi, 200)

fig, ax = plt.subplots()
ax.plot(x, y, 'b')
xlim_data = plt.xlim()
ylim_data = plt.ylim()

enter image description here

In the Fourier Transform, one of the parameters is the function f(t)

enter image description here

The original signal is not a function, so it was necessary to build 2 new graphs, where the x-axis goes from 0 to 2pi, which is the interval of the integral, and the y-axis of the two graphs comes one from the x-axis of the signal, and the other from the y-axis of the signal

This 13s video is very explanatory:


Here is the code that will generate the 2 graphics mentioned.

x_of_function = np.linspace(0, 2*np.pi, 200)

fig2, ax2 = plt.subplots(1,2, figsize=(10, 10))

ax2[0].plot(x_of_function, x) 
ax2[1].plot(x_of_function, y)

enter image description here

In this way, it is possible to make the linear interpolation of each graph.

I will have it at the end of the process 2 interpolations.

def f(t, x_0_2pi, x_of_signal, y_of_signal):
    y_graphic_1 = np.interp(t, x_0_2pi, np.array(x_of_signal))
    y_graphic_2 = np.interp(t, x_0_2pi, np.array(y_of_signal))
    resp = y_graphic_1 + 1j* y_graphic_2 #????
    return resp

My question is, why can I convert one of the interpolations as the imaginary part and join it with the another interpolation that will be the real part?

The code works, I can make drawings using circles, my question is precisely this, why can I do this?

y_graphic_1 + 1j* y_graphic_2

What is the mathematical basis that allows me to use one of the axes of my sign as an imaginary number?


1 Answer 1


Fourier transform are able to approximate a wite range of complex function $f(t) = x(t) + j\cdot y(t)$ that satisfies the Dirichlet conditions, with negligible small mean square error. Well, in particular any curve with finitely many inflection points could can be closely approximated with a Fourier series.

additional reading


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.