I'm gonna show you why the Menger Sponge is my all-time favorite fractal and

I'm gonna show you how to squeeze some Pi out of it. But first we need to start with

"What is a fractal?" And to do that initially we need ... a square! ... right so here

I am in a fairly standard issue square, you can see it's got a nice tidy amount

of surface area in front and it's got a finite perimeter going around the edge

we're now going to turn it into a fractal. To do that we need to just

divide the surface up into 9 smaller squares. I'm gonna say we're dividing it

up into thirds, 'cos that's what we're doing in both directions we can now take the centre 3rd

and just pop it out so here we have most of the square still intact the surface

area has gone down slightly it's now eight ninths of what it was before

and correspondingly, the perimeter is gone up slightly because of this new bit

in the middle but we can repeat the process check out these eight squares, we can

divide all of them into thirds, we can pop out the middle bit and we've now reduced the area

again it's now eight ninths of eight ninths of the original area and the perimeter is

gone up slightly but why stop there? We can get of those remaining tiny little squares

we can divide them all up into thirds, pop out the centre ninth from every single

one of them and then repeat. You can do this over and over again. In fact to be a

true fractal you have to do this

infinitely many times. We need to be able to zoom in constantly and never hit the bottom

no matter how far you go down you will always see the missing bits in the middle

that means, if we try and work out the total area of this fractal shape it's zero

because that's the limit if you've got eight ninths times eight ninths times eight ninths.

Eight ninths to some power as that power goes towards infinity the area goes to zero.

Whereas the perimeter, because it gets bigger each time

it goes towards infinity. So this is a shape with zero surface area but yet

an infinite perimeter. So this is a 2D shape called a Serpinski carpet and fractals are

now a century-old it was 1916 when Mr Serpinski first came up with this and frankly it's been

amazing people ever since (although to be honest we probably should stop zooming in for a

while because this is starting to make me feel a little bit scale sick)

of course now we can do this one dimension higher to get a true 3D fractal

this time you start with a cube you could imagine dividing each face up into ninths

and then you punch out the center ones and effectively what you've done is

if you started with the cube made up of 27 smaller cubes you've taken out all

the one that cross through the center leaving this shell of 20 cubes. But you could

take each of those twenty cubes and you could repeat the process punch out the

center of all of them and then you can do that again and in theory you could

carry this on infinitely many times and you would get the fractal which has zero

volume but yet infinite surface area the Menger Sponge. You can even make your own

one of these there is an origami method to take six business card you can fold

them all together to make a cube and then you could actually attach kind of

cladding printed cards onto the outside and if each of those outside cards has a

Serpinski Carpet printed onto it

the resulting cube looks like a Menger Sponge. But why stop there? Before you

put the cladding on you could've joined twenty of those cubes together could

they've got little tabs that interlock and they all join quite nicely

those 20 cubes would give you a level one Menger Sponge. Why stop there? 20 cubes? Please!

what if you made 20 of those level ones that would require 400 cubes but if you

were able to get together you could make yourself a level two Menger Sponge

and of course for completeness you could take 20 level 2 Menger Sponges and join them all

together to make a level 3 but what a ridiculous origami object that would be

8000 cubes all clicked together strategically covered in cladding no one

will be ridiculous enough to try such ok I may have done it I got together with

some friends of mine at the Manchester science festival in 2014 and we built a

level 3 Menger Sponge. You can see the level one sat inside it there and the whole thing is

level 3. What an achievement! And we weren't even the first to make one of these. Origami expert

Jeannine Mosely had previously made a level 3 origami Menger Sponge in fact

she's the one who came up with the technique to do this but we were so

pleased we've made to achieve this. And then we thought, well hang on, why don't we make a level four

we would just have to make twenty of these which I will admit even for me

and my ridiculous group of volunteering friends that is not achievable to make a

level four Menger Sponge we worked out you would need around a million business

cards and you would need people all around the world. You would pretty much have to build

20 of them in different locations around the planet. Which we may have done.

So as well as Manchester in the UK we had other cubes in London and Edinburgh in

Cambridge and Bath and plenty more and then in the United States there was New York

and Oregon and San Francisco and Colorado and plenty more sorry for all

the people I haven't mentioned specifically and then around the world

New Zealand, China, Spain, Finland, Canada (wherever that is) we were able to build

the equivalent of a level 4 Menger Sponge, admittedly distributed around the planet

this was a project called Mega Menger I will admit one of the more ridiculous ideas I

have ever come up with and I cant believe it actually happened I'm hugely

in debt to Katie Steckels and Laura Tillman who helped me put this whole

thing together and then Queen Mary University of London made it possible to

provide the business cards to so many places all

around the planet and we actually did it if you wanna see more of the photos you

can go to megamenger.com and we still have all the instructions on there

you can build your own one of these you can even still send it in we've got

enough for a level four but we're still taking more photos as people built them all around the world

check out the website there are worksheets, resources, banners, theres the full

set of printing instructions you can just give to a printer and they will

make the cards up for you or you can provide your own cards. At the very least at the end of

this video go print out at home and make for yourself a level one Menger Sponge

so that Mega Menger and that's why the Menger Sponge has a very special place in my

mathematical heart. But how does Pi tie into this? Well just when I thought I was able

to leave the Menger Sponge behind I was over at a recreational math conference

in Atlanta, USA. It's called The Gathering For Gardner, and actually it was at the same

meeting two years ago where I first met Laura and we hatched the ridiculous plan

to do the whole mega Menger project, and at the meeting this time I did a presentation

about my various videos where I'd used pies to try and calculate the value of

pi I know it's hilarious I did the one where I took hundreds of pies and put

them in a circle you can see that over on the numberphile channel and I talked

about the video on this stand-up maths channel a little while ago where I

suspended a pie from a string and used a pi-endulum to calculate pi.

At last my talk was finished and I went back to my seat to listen to the next talk someone walked over to me

tapped me on the shoulder and handed me a piece of paper and then they just walked away.

And I unfolded and I had a look at it and it said "squeezing pie from the Menger Sponge"

And I thought .. I've never come across pi in the Menger Sponge before what on earth could

this possibly be and I managed to resist the temptation to google it there

and then because other people were doing their talks later on I looked it up and

I could not believe what I found. Once again we need to start with another

square so here I am in once again

boring 2D square. So when I googled squeezing pi from the Menger Sponge

initially it gave me a slightly different variation on the Serpinski Carpet.

I went to a website where a guy called Ed Pegg had written a whole lot of

Mathematica code to generate a Serpinski Carpet but then he made one slight

tweak. So initially if we take the

area of the Serpinski Carpet to be four. So before we've done anything, we've punched nothing out

it's four, we can now remove the center 3rd like before now we're not going to

remove the center third of all the remaining squares, we're going to

remove the centre fifths, so actually we're taking away one 25th, or rather we're leaving

24 25ths. And so the area of this shape is four times eight ninths times 24 25ths and

now we can continue. All the remaining ones were gonna take out the center

seventh. So we're gonna leave behind 48 49ths. And we can carry on all the way down. Next we'll

have 63 64ths and then 80 81ths (or whatever you wanna call them). And miss time

that is not tending to 0. This fractal has got some left over surface area if you actually

work out what it is, it's Pi. Yep you are looking at exactly Pi surface area as

much as that sudden appearance of Pi shocked me

(classic Pi) after a little while it made a smidgen of sense fractals and Pi

are quite well made for each other. To get a fractal you have to do something over

and over and over and over and it only truly works if you do it infinitely many

times. In a recent video which I will link to below I tried to calculate Pi

using an infinite series and again you have to do the same thing over

infinitely many times and so this particular fractal is actually based on

something called in the Wallace Formula, or the Wallace Infinite Product. If you

multiply all these crazy fractions together you get Pi and the shape in

front of me is basically just doing that but in a geometric way and so this is

called the Wallace Sieve. It still blows my mind that this thing, a square with a radius of one,

so the distance from the center to hit the side at an orthogonal angle has an

area of Pi, and you go "well hang on, what is the other shape with the radius of one that has a

surface area of Pi?" That's right it's a circle! So this crazy shape here has the same

surface area as a standard-issue garden variety unit circle. But what about 3D?

I mean this worked in 2D surely we can generalize it up a dimension. Well Ed

wasn't sure and these things are never guaranteed to work in higher dimensions

so instead of doing the elaborate working out first, he thought he'd just give it a go

So if you take a 3D cube and then you punch out the center one-third

squares and on the remaining squares you punch out the center fifth squares and then

1/7th and all the way down, the volume of the shape you end up with is indeed

based on Pi. He couldn't believe it when it came out to be

four thirds of Pi. It is the volume of a sphere that would fit inside the cube, and that just

blows my mind the volume of that is the same as the volume of that. Maths eh?

So there you are, that is how you squeeze Pi out of the mega Menger, it may have been my all-time favorite

fractal but I didn't know it could do that until just a week ago. If you'd like

to learn more about how to make your own origami one of these you can watch the

video which the MIT guys made about their part in the mega Menger project

they've got a pretty good explanation of how you put it together and there's a

guest appearance from Jeannine Mosely herself underneath the video in the

description I will have a link both in the mega Menger project

to Ed Peggs's page if you wanna have a closer look at how to actually grab a

hold and squeeze out some Pi.