Processing - Menger Sponge
Overview
This is a Processing sketch inspired by the Coding Train’s Coding Challenge #2 on create a Menger Sponge.
Keys:
wandsmove in and out respectivelyUP/DOWNtilts the object forward and backLEFT/RIGHTrotates the object around a vertical accesscresets the iteration to the first steprtoggles the rotation on / off.
Mouse:
- Click (anywhere) … generates the next step in the recursion (up to a limit, to avoid generating too many boxes)