Coding Challenge #127: Brownian Tree Snowflake
In this holiday coding challenge, I create a "Brownian Tree Snowflake" in Processing (Java). This video was recorded as part of a fundraiser for the Processing Foundation. Code: https://thecodingtrain.com/challenges/127-brownian-tree-snowflake
πΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/SJcAeCpgE
π₯ Previous video: https://youtu.be/-OL_sw2MiYw?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Next video: https://youtu.be/pdaNttb7Mr8?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
π° Support the Processing Foundation: https://processingfoundation.org/support/
πΎ Code Golf - Draw a Snowflake: https://codegolf.stackexchange.com/questions/42506/draw-a-snowflake
βοΈ Snowflake: https://www.flickr.com/photos/golanlevin/sets/72157594387404319
Live Stream Archive:
π΄ Coding Train Live Holiday Telethon 2018: https://youtu.be/WACLmPBxMaw?t=2392s
Related Coding Challenges:
π #34 Diffusion-Limited Aggregation: https://youtu.be/Cl_Gjj80gPE
π #52 Random Walker: https://youtu.be/l__fEY1xanY
π #128 SketchRNN Snowflakes with ml5.js: https://youtu.be/pdaNttb7Mr8
π #129 Koch Fractal Snowflake: https://youtu.be/X8bXDKqMsXE
π #155 Kaleidoscope Snowflake #SupportP5: https://youtu.be/R3C2giDfmO8
Timestamps:
0:00 Introduction
0:51 Brownian tree
1:46 Diffusion Limited Aggregation
2:18 Snowflakes have a hexagonal pattern
3:52 Create a Particle class
4:52 Add a random walk to the particle
6:19 Translate to the center
7:02 Make an array of snowflakes
8:00 Write a finished function
9:05 Write an intersects function
11:04 Add kaleidoscope
13:18 Edit code to add a vector
14:00 Constrain particle to a slice of the hexagon
15:52 Speed up the animation
16:43 Improve branching
17:33 Randomize the starting position
18:10 Conclusion and creative possibilities
19:05 Please consider supporting the Processing Foundation!
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
#browniantreesnowflake #snowflakegenerator #diffusionlimitedaggregation #processing