Рет қаралды 307,372
In this coding challenge, I attempt to code the Menger Sponge (fractals) using Processing. Code: thecodingtrain.com/challenges...
🕹️ p5.js Web Editor Sketch: editor.p5js.org/codingtrain/s...
🎥 Previous video: • Coding Challenge 1: St...
🎥 Next video: • Coding Challenge #3: T...
🎥 All videos: • Coding Challenges
References:
🌐 Menger Sponge on Wikipedia: en.wikipedia.org/wiki/Menger_...
🇵 P3D Tutorial: processing.org/tutorials/p3d/
🇵 ArrayList in Processing: processing.org/reference/Arra...
Videos:
🎥 Fractals in Processing: • 8: Fractals - The Natu...
🔴 Coding Train Live 31: • Coding Train Live 31: ...
Related Coding Challenges:
🚂 #18 3D Fractal Trees: • Coding Challenge #18: ...
🚂 #123 Chaos Game: • Coding Challenge #123:...
🚂 #126 Toothpicks: • Coding Challenge #126:...
🚂 #129 Koch Fractal Snowflake: • Coding Challenge #129:...
🚂 #168 The Mandelbulb: • Coding Challenge 168: ...
Timestamps:
0:00 Welcome to a 10 minute Coding Challenge!
0:26 Quick math about the Menger Sponge
1:02 Code! Drawing a 3D box in Processing
2:14 Creating a Box class
3:36 Use a Box object instead of the hardcoded box
4:02 Chopping up one Box into multiple ones
6:53 Modeling the Menger Sponge as an ArrayList of Boxes
7:41 Generating the next iteration on mouse click
9:47 Bonus time! Adding 2 more minutes 😜
10:03 How to determine which boxes need to be removed?
10:48 Code! Removing the extra boxes
12:12 Enhancing the visuals
13:32 Done! The Menger Sponge in Processing
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
🚂 Website: thecodingtrain.com/
👾 Share Your Creation! thecodingtrain.com/guides/pas...
🚩 Suggest Topics: github.com/CodingTrain/Sugges...
💡 GitHub: github.com/CodingTrain
💬 Discord: / discord
💖 Membership: kzfaq.infojoin
🛒 Store: standard.tv/codingtrain
🖋️ Twitter: / thecodingtrain
📸 Instagram: / 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-o...
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecod...
#fractal #3d #processing