Coding Challenge #21: Mandelbrot Set with p5.js
In this coding challenge, I program from scratch the Mandelbrot set with p5.js Code: https://thecodingtrain.com/challenges/21-mandelbrot-set-with-p5js
πΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/KsV1wWLqd
π₯ Previous video: https://youtu.be/jrk_lOg_pVA?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Next video: https://youtu.be/fAsaSkmbF5s?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
π Wikipedia on Mandelbrot Set: https://en.wikipedia.org/wiki/Mandelbrot_set
πΎ Mandelbrot Set Explorer: https://meiamso.me/old/mandelbrot/mandelbrot.php
Related Coding Challenges:
π #22 Julia Set in Processing: https://youtu.be/fAsaSkmbF5s
π #140 Leibniz Formula for Pi: https://youtu.be/uH4trBNn540
π #168 The Mandelbulb: https://youtu.be/NJCiUVGiNyA
Timestamps:
0:00 Introducing today's coding challenge: the Mandelbrot set
1:22 What is a complex number?
6:06 Multiplying two complex numbers
7:51 The Mandelbrot set is all of the complex numbers that stay bounded
8:40 The initial sketch sets every pixel to gray
12:00 Calculate the real and complex components for the next generation
13:03 What does it mean to be bounded?
14:58 Set the brightness based on number of iterations
16:46 Store the original values of a and b
20:05 Set the brightness by maping to maxIterations
21:50 Add sliders to add ability to zoom in on the Mandelbrot set
24:58 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://discord.gg/hPuGy2g
π 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
#mandelbrot #fractal #complexnumber #imaginarynumber #p5js #javascript