tubeshowcaseโ—1,029,168 videosโ™ก My collection 0
โ† Learn to Code

Learn to Code14:01

Coding Challenge #2: Menger Sponge Fractal

The Coding Train โ†—

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.

Keep exploring Learn to Code