Menger Surface

Post Reply
User avatar
rbytes
Posts: 1936
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone X
iPad 4
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Menger Surface

Post by rbytes » Thu Jan 31, 2019 11:44 pm

This program creates a Menger surface, a type of fractal that is created by starting with a square shape, subdiving it into 9 equal smaller squares and drilling a square hole to replace the center square. Then each undrilled square is subdivided the same way and its center square drilled. This can continue for as many levels as we desire - in theory. In practice, we must stop when the final squares are each only 1 point in size.

The first two images show 5 levels. The third shows 6 levels, with the smallest holes only one point in size.

I sometimes choose to color the holes in mine, rather than to make them transparent.

Here is the Dropbox link. Download the folder and run the .sb file

https://www.dropbox.com/s/vn6eyfoe2gccu ... ce.sb?dl=0


Mathematician Karl Menger conceived of this idea in 1926, and extrapolated it to create a 3D figure called a Menger Sponge.
To see the Menger Sponge, click this YouTube link.

https://youtu.be/d-dI_pu_Z0g

I would love to see a Menger Sponge drawn entirely in Smart Basic, although it requires a lot of computing power. No doubt DrChip could come up with something.
Attachments
5EB1EB1D-8A94-4D77-A261-AA650B34AD80.png
5EB1EB1D-8A94-4D77-A261-AA650B34AD80.png (145.54 KiB) Viewed 111 times
C6304B2A-3484-4849-8855-451284E80163.png
C6304B2A-3484-4849-8855-451284E80163.png (76.3 KiB) Viewed 111 times
Last edited by rbytes on Wed Feb 06, 2019 5:51 pm, edited 2 times in total.
####### Living the colorful life #######

User avatar
rbytes
Posts: 1936
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone X
iPad 4
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Menger Surface

Post by rbytes » Tue Feb 05, 2019 4:41 am

My tests indicate that a 6-level Menger surface is the most complex that can be fully displayed on an iPad screen.
Attachments
695F64FE-4AAA-43E6-94EA-D1031C1828FF.jpeg
695F64FE-4AAA-43E6-94EA-D1031C1828FF.jpeg (909.88 KiB) Viewed 87 times
####### Living the colorful life #######

Post Reply