Coding Challenge #127: Brownian Tree Snowflake
80 هزار بار بازدید -
6 سال پیش
-
In this holiday coding challenge,
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: thecodingtrain.com/challenges/127-brownian-tree-sn…
🕹️ p5.js Web Editor Sketch: editor.p5js.org/codingtrain/sketches/SJcAeCpgE
🎥 Previous video: • Coding Challenge #126: Toothpicks
🎥 Next video: • Coding Challenge #128: Sketch-RNN Sno...
🎥 All videos: • Coding Challenges
References:
💰 Support the Processing Foundation: processingfoundation.org/support/
💾 Code Golf - Draw a Snowflake: codegolf.stackexchange.com/questions/42506/draw-a-…
❄️ Snowflake: www.flickr.com/photos/golanlevin/sets/721575943874…
Live Stream Archive:
🔴 Coding Train Live Holiday Telethon 2018: • Coding Train Live: Processing Founda...
Related Coding Challenges:
🚂 #34 Diffusion-Limited Aggregation: • Coding Challenge #34: Diffusion-Limit...
🚂 #52 Random Walker: • Random Walker in p5.js (Coding Challe...
🚂 #128 SketchRNN Snowflakes with ml5.js: • Coding Challenge #128: Sketch-RNN Sno...
🚂 #129 Koch Fractal Snowflake: • Coding Challenge #129: Koch Fractal S...
🚂 #155 Kaleidoscope Snowflake #SupportP5: • Coding Challenge #155: Kaleidoscope S...
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: thecodingtrain.com/
👾 Share Your Creation! thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: github.com/CodingTrain/Suggestion-Box
💡 GitHub: github.com/CodingTrain
💬 Discord: thecodingtrain.com/discord
💖 Membership: youtube.com/thecodingtrain/join
🛒 Store: standard.tv/codingtrain
🖋️ Twitter: twitter.com/thecodingtrain
📸 Instagram: www.instagram.com/the.coding.train/
🎥 Coding Challenges: • Coding Challenges
🎥 Intro to Programming: • Start learning here!
🔗 p5.js: p5js.org/
🔗 p5.js Web Editor: editor.p5js.org/
🔗 Processing: processing.org/
📄 Code of Conduct: github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecodingtrain.com/issues/n…
#browniantreesnowflake #snowflakegenerator #diffusionlimitedaggregation #processing
6 سال پیش
در تاریخ 1397/10/03 منتشر شده
است.
80,048
بـار بازدید شده