Coding Challenge #16: L-System Fractal Trees

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



Duration: 22:02
218,845 views
4,163


In this third installment of my series on algorithmic botany, I discuss L-systems and how they can be used to generate trees and other fractal patterns in p5.js. Code: https://thecodingtrain.com/challenges/16-l-system-fractal-trees

๐Ÿ•น๏ธ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/QmTx-Y_UP

๐ŸŽฅ Previous video: https://youtu.be/fcdNSZ9IzJM?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ŸŽฅ Next video: https://youtu.be/kKT0v3qhIQY?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
๐ŸŽฅ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
๐Ÿ”— L-systems: https://en.wikipedia.org/wiki/L-system
๐ŸŒฟ Algorithmic Botany: http://algorithmicbotany.org/
๐Ÿ“• My NOC class on Kadenze: https://www.kadenze.com/courses/the-nature-of-code/info

Videos:
๐ŸŽฅ Algorithmic Botany Track: https://thecodingtrain.com/tracks/algorithmic-botany
๐Ÿ”ด Coding Train Live 40: https://youtu.be/MwLyeEWnMCY?t=5420s

Related Coding Challenges:
๐Ÿš‚ #14 Recursive Fractal Trees: https://youtu.be/0jjeOYMjmDU
๐Ÿš‚ #123 Chaos Game: https://youtu.be/7gNzMtYo9n4
๐Ÿš‚ #174 AppleSoft Basic Fractal Tree: https://youtu.be/UNkHditYGls

Timestamps:
0:00 Introducing today's topic: L-systems
0:57 The elements of an L-system
4:12 Let's Code!
4:42 Add rules
6:22 Write a generate function
8:46 Create a button
12:32 Use a particular L-system
13:32 Read the text and draw to the screen
14:19 Write a turtle function
18:08 Translate to the bottom, middle of the screen
20:08 Add an angle variable
21:11 Add some alpha
21:30 Conclusion and suggestions for your own version

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

#fractaltrees #lsystem #javascript #p5js #processing







Tags:
fractal
coding
challenge
l-system
fractals
processing tutorial
nature of code
coding challenge
object oriented programming
creative coding
object oriented
l-systems
p5.js
tutorial
p5js
processing
p5.js tutorial
programming challenge
javascript (programming language)
javascript
pvector
algorithmic botany
lindenmeyer system
lindenmeyer
lsystem
lsystem javascript
l-system javascript