23:24Coding Challenge #2: Menger Sponge Fractal
From the creator
In this coding challenge, I attempt to code the Menger Sponge (fractals) using Processing. Code: https://thecodingtrain.com/challenges/2-menger-sponge ๐น๏ธ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/5kcBUriAy ๐ฅ Previous video: https://youtu.be/17WoOqgXsRM?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH ๐ฅ Next video: https://youtu.be/AaGK-fj-BAM?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH ๐ฅ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH References: ๐ Menger Sponge on Wikipedia: https://en.wikipedia.org/wiki/Menger_sponge ๐ต P3D Tutorial: https://processing.org/tutorials/p3d/ ๐ต ArrayList in Processing: https://processing.org/reference/ArrayList.html Videos: ๐ฅ Fractals in Processing: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6bXUJvjnMWGU5SmjhI-OXef ๐ด Coding Train Live 31: https://youtu.be/Md5LIDW0RyY?t=2738 Related Coding Challenges: ๐ #18 3D Fractal Trees: https://youtu.be/JcopTKXt8L8 ๐ #123 Chaos Game: https://youtu.be/7gNzMtYo9n4 ๐ #126 Toothpicks: https://youtu.be/-OL_sw2MiYw ๐ #129 Koch Fractal Snowflake: https://youtu.be/X8bXDKqMsXE ๐ #168 The Mandelbulb: https://youtu.be/NJCiUVGiNyA 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
Published 2016-04-18 ยท Watch on YouTube โ
Availability and playback restrictions are controlled by the original channel.





