Skip to content
0:00 / 0:00

#fouriertransform#p5.js#epicycles

Coding Challenge #130.1: Drawing with Fourier Transform and Epicycles

The Coding Train

1.7M subscribers • 4 videos on Hallway

YouTube

Intermediate. Assumes working knowledge.

339K views7 years ago2 recommendations

Graphics and audioComputer scienceJavaScriptCreative codingAlgorithms

Daniel Shiffman implements the Discrete Fourier Transform in JavaScript using p5.js to render user-drawn paths with epicycles.

In this coding challenge, I implement the Discrete Fourier Transform algorithm in JavaScript and render a drawing using epicycles derived from the transform. Code: thecodingtrain.com/challenges/130-drawing-with-fourier-trans… p5.js Web Editor Sketches: 🕹️ Fourier Transform: editor.p5js.org/codingtrain/sketches/RfrZibjfL 🕹️ Fourier Transform - user-drawn path: editor.p5js.org/codingtrain/sketches/jawHqwfda 🕹️ Fourier Transform - complex numbers: editor.p5js.org/codingtrain/sketches/ldBlISrsQ 🕹️ Fourier Transform - user-drawn path with complex numbers: editor.p5js.org/codingtrain/sketches/sPvZsg2w4 Other Parts of this Challenge: 📺 Part 2: youtu.be/n9nfTxp_APM 📺 Part 3: youtu.be/7_vKzcgpfvU 🎥 Previous video: youtu.be/X8bXDKqMsXE?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH 🎥 Next video: youtu.be/0j86zuqqTlQ?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH 🎥 All videos: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH References: 🚂 Coding Train Logo: twitter.com/TomFevrier/status/1079437780466520065 💾 p5.FFT: p5js.org/reference/#/p5.FFT 💾 FFT on Algorithm Archive: algorithm-archive.org/contents/cooley_tukey/cooley_tukey.htm… 🗄 Discrete Fourier transform on Wikipedia: en.wikipedia.org/wiki/Discrete_Fourier_transform 🗄 Complex Number on Wikipedia: en.wikipedia.org/wiki/Complex_number Videos: 🎥 But what is the Fourier Transform? A visual introduction: youtu.be/spUNpyF58BY 🎥 Fourier Analysis For The Rest Of Us: youtu.be/2hfoX51f6sg 🎥 Epicycles, complex Fourier series and Homer Simpson's orbit: youtu.be/qS4H6PEcCCA 🔴 Code Train Live 165: youtu.be/0b3R8oWffkw?t=2657s Related Coding Challenges: 🚂 #125 Fourier Series: youtu.be/Mm2eYfj0SgA Timestamps: Introducing today's topic: a Fourier transform drawing machine Fourier transform algorithm Signal processing Make a signal array Euler's formula Write the discrete Fourier transform function What do we need for a circular epicycle? Calculate the amplitude, frequency, and phase Calculate amount of time to move per frame of animation Draw an arbitrary path for both x and y Write an epiCycles() function Have epiCycles() return a vector with an x and y Grab the path of the Coding Train logo Render the epiCycles by order of amplitude Conclusion and next steps Editing by Mathieu Blanchette Animations by Jason Heglund Music from Epidemic Sound 🚂 Website: thecodingtrain.com/ 👾 Share Your Creation! thecodingtrain.com/guides/passenger-showcase-guide 🚩 Suggest Topics: github.com/CodingTrain/Suggestion-Box 💡 GitHub: github.com/CodingTrain 💬 Discord: thecodingtrain.com/discord 💖 Membership: youtube.com/thecodingtrain/join 🛒 Store: standard.tv/codingtrain 🖋️ Twitter: https:

Why it's here

2 people recommend this

What people say. Recommended as an excellent, highly clear live-coded explanation of drawing with the Fourier transform.

u/matt_hammondin r/programming • Recommends

On “Fourier Transform drawing with two functions”

This is the exact same thing that CodingTrain did recently: link to this video It's live coded on his video and he explains it really good.

u/uniqmanin r/programming • Recommends

On “Fourier Transform drawing 2.0 (with epicycles)”

Also relevant Coding Challenge #130: Drawing with Fourier Transform and Epicycles