Coding Challenge #130: Fourier Transform User Drawing
In this coding challenge, I implement the Discrete Fourier Transform algorithm in JavaScript and render a drawing using epicycles derived from the transform. Code: https://thecodingtrain.com/challenges/130-drawing-with-fourier-transform-and-epicycles
p5.js Web Editor Sketches:
๐น๏ธ Fourier Transform: https://editor.p5js.org/codingtrain/sketches/RfrZibjfL
๐น๏ธ Fourier Transform - user-drawn path: https://editor.p5js.org/codingtrain/sketches/jawHqwfda
๐น๏ธ Fourier Transform - complex numbers: https://editor.p5js.org/codingtrain/sketches/ldBlISrsQ
๐น๏ธ Fourier Transform - user-drawn path with complex numbers: https://editor.p5js.org/codingtrain/sketches/sPvZsg2w4
Other Parts of this Challenge:
๐บ Part 1 - Drawing with Fourier Transform and Epicycles : https://youtu.be/MY4luNgGfms
๐บ Part 3 - Complex Numbers: https://youtu.be/7_vKzcgpfvU
๐ฅ Previous video: https://youtu.be/X8bXDKqMsXE?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ฅ Next video: https://youtu.be/0j86zuqqTlQ?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ฅ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
๐ Coding Train Logo: https://twitter.com/TomFevrier/status/1079437780466520065
๐พ p5.FFT: https://p5js.org/reference/#/p5.FFT
๐พ FFT on Algorithm Archive: https://www.algorithm-archive.org/contents/cooley_tukey/cooley_tukey.html
๐ Discrete Fourier transform on Wikipedia: https://en.wikipedia.org/wiki/Discrete_Fourier_transform
๐ Complex Number on Wikipedia: https://en.wikipedia.org/wiki/Complex_number
Videos:
๐ฅ But what is the Fourier Transform? A visual introduction: https://youtu.be/spUNpyF58BY
๐ฅ Fourier Analysis For The Rest Of Us: https://youtu.be/2hfoX51f6sg
๐ฅ Epicycles, complex Fourier series and Homer Simpson's orbit: https://youtu.be/qS4H6PEcCCA
๐ด Code Train Live 165: https://youtu.be/0b3R8oWffkw?t=8241s
Related Coding Challenges:
๐ #125 Fourier Series: https://youtu.be/Mm2eYfj0SgA
Timestamps:
0:00 Fourier Transform and Epicycles Part 2 - render a user-drawn path
1:20 Create a state variable
2:18 When the mouse is pressed, set the state as "user"
4:18 Render points while the user is drawing
6:48 Reset variables
7:38 Fix offset
8:38 Up next: have the inputs be complex numbers
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
๐ Website: http://thecodingtrain.com/
๐พ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
๐ฉ Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
๐ก GitHub: https://github.com/CodingTrain
๐ฌ Discord: https://thecodingtrain.com/discord
๐ Membership: http://youtube.com/thecodingtrain/join
๐ Store: https://standard.tv/codingtrain
๐๏ธ Twitter: https://twitter.com/thecodingtrain
๐ธ Instagram: https://www.instagram.com/the.coding.train/
๐ฅ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ฅ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
๐ p5.js: https://p5js.org
๐ p5.js Web Editor: https://editor.p5js.org/
๐ Processing: https://processing.org
๐ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new
#fouriertransformsquarewave #discretefouriertransform #epicyclesdrawing #javascript #p5js