Read about the Fourier Transform
You can play with some parameters, try and check how the animation changes!
How many vectors to use:
Time step multiplier:
Show your input
Show the vectors
Reset the red trace
Input your own data (JSON array of objects with 'x' and 'y' properties):
If you see some weird artifacts that shouldn't be there, try to reduce vectors or draw your path slower.
Test it with the logo of The Coding Train