Coding Challenge #2: Menger Sponge Fractal

Описание к видео Coding Challenge #2: Menger Sponge Fractal

In this coding challenge, I attempt to code the Menger Sponge (fractals) using Processing. Code: https://thecodingtrain.com/challenges...

🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/s...

🎥 Previous video:    • Coding Challenge 1: Starfield Simulation  
🎥 Next video:    • Coding Challenge #3: The Snake Game  
🎥 All videos:    • Coding Challenges  

References:
🌐 Menger Sponge on Wikipedia: https://en.wikipedia.org/wiki/Menger_...
🇵 P3D Tutorial: https://processing.org/tutorials/p3d/
🇵 ArrayList in Processing: https://processing.org/reference/Arra...

Videos:
🎥 Fractals in Processing:    • 8: Fractals - The Nature of Code  
🔴 Coding Train Live 31:    • Coding Train Live 31: Shape Morphing ...  

Related Coding Challenges:
🚂 #18 3D Fractal Trees:    • Coding Challenge #18: 3D Fractal Trees  
🚂 #123 Chaos Game:    • Coding Challenge #123: Chaos Game Part 1  
🚂 #126 Toothpicks:    • Coding Challenge #126: Toothpicks  
🚂 #129 Koch Fractal Snowflake:    • Coding Challenge #129: Koch Fractal S...  
🚂 #168 The Mandelbulb:    • Coding Challenge 168: MandelBulb 3D F...  

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: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/guides/pas...
🚩 Suggest Topics: https://github.com/CodingTrain/Sugges...
💡 GitHub: https://github.com/CodingTrain
💬 Discord:   / discord  
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
🖋️ Twitter:   / thecodingtrain  
📸 Instagram:   / the.coding.train  

🎥 Coding Challenges:    • Coding Challenges  
🎥 Intro to Programming:    • Start learning here!  

🔗 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-o...

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecod...

#fractal #3d #processing

Комментарии

Информация по комментариям в разработке