Coding Challenge #130: Fourier Transform Drawing with Complex Number Input

Subscribers:
1,740,000
Published on ● Video Link: https://www.youtube.com/watch?v=7_vKzcgpfvU



Duration: 25:11
41,703 views
1,183


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 2 - User Drawn Path: https://youtu.be/n9nfTxp_APM

๐ŸŽฅ 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 166: https://youtu.be/-VfWfi7Goik?t=217s

Related Coding Challenges:
๐Ÿš‚ #125 Fourier Series: https://youtu.be/Mm2eYfj0SgA

Timestamps:
0:00 Fourier Transform and Epicycles Part 3 - Complex Numbers
4:44 Complex numbers
6:06 Let's Code!
8:00 Create a Complex number class
13:37 Use "FOIL" to multiply complex numbers
17:13 Write an add function to add the real components / imaginary components together
22:02 Add a user-drawn path
24:27 Conclusion and suggestions for variations

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







Tags:
computer science
daniel shiffman
coding
the coding train
coding challenge
creative coding
code challenge
javascript (programming language)
programming challenge
fourier series
fourier transform
fourier visualized
fourier series visualization
fourier series square wave
discrete fourier transform
discrete fourier transform example
epicycles fourier series
epicycles drawing
complex number
complex number fourier
imaginary number
complex number math