Coding Challenge #108: Barnsley Fern
Visualizing the Barnsley Fern fractal with Processing (Java)! Code: https://thecodingtrain.com/challenges/108-barnsley-fern
πΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/G4V940Y8V
π₯ Previous video: https://youtu.be/diGjw5tghYU?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Next video: https://youtu.be/Ae73YY_GAU8?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
Links Discussed:
π Barnsley fern on Wikipedia: https://en.wikipedia.org/wiki/Barnsley_fern
Videos:
π₯ Algorithmic Botany Track: https://thecodingtrain.com/tracks/algorithmic-botany
π₯ Matrix Math: https://youtu.be/uSzGdfdOoG8
π΄ Livestream Archive: https://youtu.be/_9ZerP7pGvc
Related Coding Challenges:
π #14 Recursive Fractal Trees: https://youtu.be/0jjeOYMjmDU
π #15 Object-Oriented Fractal Trees: https://youtu.be/fcdNSZ9IzJM
π #16 Fractal Trees - L-System: https://youtu.be/E1B4UoSQMFw
π #17 Space Colonization: https://youtu.be/kKT0v3qhIQY
π #18 3D Fractal Trees: https://youtu.be/JcopTKXt8L8
π #174 AppleSoft Basic Fractal Tree: https://youtu.be/UNkHditYGls
Timestamps:
0:00 Introducing today's topic
0:49 Discuss the algorithm
2:23 Explanation of matrix algebra
4:20 Let's Code!
5:24 Input the transformation formula for next x and y
7:15 Remap the values to the width and height of the canvas
8:32 Add other transformation formulas for next x and y
11:12 Pick a random number to choose the tranformation
12:08 Add nextPoint, drawPoint functions
13:51 Add probabilities
15:57 Update the range
16:41 Thanks for watching!
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
#fractals #algorithmicbotany #p5js #javascript