Coding Challenge #127: Brownian Tree Snowflake

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



Duration: 19:25
75,369 views
2,532


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







Tags:
programming
daniel shiffman
tutorial
coding
the coding train
coding challenge
coding train
creative coding
code challenge
creative coding tutorials
programming challenge
brownian tree
brownian tree snowflake
brownian snowflake
snowflake generator
computational snowflake
snowflake drawing
snowflake coding challenge
code golf snowflake
snowflake processing
processing challenge
processing coding challenge
diffusion limited aggregation
computer science