TubeSum ← Transcribe a video

Calculating pi with a lunar rover (Moon Pi Update!)

0h 15m video Transcribed Jun 30, 2026 S Stand-up Maths
Intermediate 10 min read For: Math enthusiasts, space enthusiasts, and fans of the channel interested in a creative pi calculation project.
130.7K
Views
7.0K
Likes
701
Comments
56
Dislikes
5.9%
🔥 High Engagement

AI Summary

The video explains the plan to calculate pi on the moon using a lunar rover's spare compute time. It describes the mathematical method using random walks on a sphere and measuring distances to axes, and provides updates on the mission's progress, including a Kickstarter success and a patch mistake.

[00:00]
Fun fact: π/4 average distance

The average distance from any point on a sphere to an axis is π/4, derived from a double integral.

[01:52]
Mission opportunity

Engineers from the lunar rover mission reached out to offer spare compute time for calculating pi.

[02:22]
Kickstarter success

The Kickstarter was double funded, allowing two attempts to calculate pi on the moon.

[03:47]
Virtual rover method

The method uses a virtual rover on a virtual moon, reoriented by random sensor data, taking steps and calculating distance to an axis.

[05:13]
Icosahedron axes

Using 16 axes from an icosahedron (6 from vertices, 10 from faces) improves convergence.

[10:08]
Optimal step size

Small steps caused slow convergence; optimal step size is half the lunar radius.

[11:39]
Simulation result

After 1000 steps with big steps, the simulation gave π = 3.142.

[14:34]
Patch mistake

The mission patch has a mistake: one circle has 2.14 stars instead of 3.14.

Clickbait Check

95% Legit

"The video thoroughly explains the method and mission update, matching the title's promise."

Mentioned in this Video

Study Flashcards (10)

What is the average distance from any point on a sphere to an axis?

easy Click to reveal answer

π/4

What method is used to calculate pi on the moon?

medium Click to reveal answer

Probabilistic approach using random walks and sensor data.

02:46

How many axes are used from the icosahedron?

medium Click to reveal answer

16 axes (6 from vertices, 10 from faces).

05:13

What is the optimal step size for convergence?

hard Click to reveal answer

Half the lunar radius.

10:08

What is the mistake on the mission patch?

easy Click to reveal answer

One star missing, so 2.14 stars instead of 3.14.

14:34

How often is data sent back from the rover?

medium Click to reveal answer

Every five seconds.

11:12

Who designed the mission patch?

easy Click to reveal answer

Turner Prize winning artist Keith Tyson.

06:58

Why is the icosahedron used?

medium Click to reveal answer

Because it resembles a football (truncated icosahedron) and provides 16 axes.

05:42

What is the virtual rover's step size after optimization?

hard Click to reveal answer

0.5 lunar radii.

10:08

What is the running total of distances used for?

medium Click to reveal answer

To calculate the average distance to an axis, which gives π/4.

04:30

💡 Key Takeaways

📊

Average distance to axis is π/4

It's a neat mathematical result that forms the basis of the pi calculation method.

💡

First person to calculate pi on the moon

It's a unique achievement combining space exploration and mathematics.

02:09
🔧

Using 16 axes from icosahedron

This improves convergence efficiency by measuring multiple distances per step.

04:47
🔧

Optimal step size half lunar radius

Solves the slow convergence issue by ensuring the virtual rover covers the sphere quickly.

10:08
📊

Patch mistake: missing star

A humorous error that adds character to the mission.

14:34

✂️ Creator Tools: Viral Hooks

AI-generated clip ideas for Shorts based on the transcript

No viral clips found for this video, or they are still being generated.

[00:00] Here's a fun fact for not quite pie day yet. Did you know the average distance of any point on a sphere to an axis, like a line right through the middle of the sphere, is pie on four. I mean,

[00:12] it's not super surprising. We've got a sphere, so pie is going to show up. But pie on four drops out really nicely if you look into it. You're only one double integral away. The double integral is effectively using latitude and longitude to cover the surface of a sphere and for every little bit

[00:28] of that surface, we want to calculate the distance it is from the axis. Now that little dA of area, we want that to be the same every time. So we actually have to have sine theta d theta d phi. That's

[00:40] to compensate for like lines of longitude bunch up at the poles. Don't worry about it too much and our equation for how far any bit of area is from the axis is just sine theta. Now we don't have to do this for the entire surface of the sphere by symmetry. You could do less. But if you do the whole

[00:56] thing, you then have to divide it by the entire area of the sphere so we get a distance on average, which is four pi and that top integral actually gives that a pi squared. And then we cancel out one of the pi's and the grand result is pie on four. Okay, in hindsight, maybe I said drops out nicely with

[01:09] too much confidence. You get there eventually in the integral, bit hand wavy, little messy. If anyone out there comes up with a nicer visual way to explain that, grant. Let me know. I don't know why we got

[01:22] distracted by the integration in the first place. The point is an average of pie on four away from the axis on a sphere. And this is not the pie day video. That will be coming up later. Close to the

[01:35] pie day. This is a moon pie update video because that is how we're going to calculate pie on the moon.

[01:52] Now there's a whole other video setting up moon pie. I'll link to that below. The short version is the engineers working on the next lunar rover, at least one of them that's going up on the next lander, turns out they watch mass videos on YouTube and they're reached out to see if I wanted to use

[02:09] some of the spare compute time on the rover to do something interesting. And I said yes, I want to be the first person to calculate pie on the moon. And good news, it's happening. So last time I said we

[02:22] had a lot of costs to cover because any extra cost we caused the mission we have to pay for. And you've done it. We started a Kickstarter campaign and it's been double funded. So now we get two attempts

[02:34] to calculate pie on the moon because space science, it's a risky business putting things in space. Also I've heard. So it's happening. I'm so excited. I'll talk more about it at the end of the video.

[02:46] But the cliffhanger I left you on last time was what method are we going to use to calculate pie on the moon? We already established we're going to be using a probabilistic approach to calculating

[02:58] pie. And we're going to take the data from the sensors on the rover to sample the lunar environment as our source of randomness. And the reason we're doing it this way is because we're not allowed to actually drive the rover around. But we did want the method to somehow involve the lunar

[03:15] environment we're in. And little update, I think I found a loophole while we're not allowed to drive the actual lunar rover around. We are allowed to drive a virtual lunar rover around. So the coat

[03:32] we've written, which is now loaded on the rover, is a virtual lunar rover simulator. We will be simulating a virtual lunar rover moving on a virtual moon by running the virtual sim on an actual

[03:47] lunar rover on the actual surface of the moon. I cannot tell you how much this pleases me. Here's how it actually works. At the beginning of the mission, we take a point on a sphere. That's our beginning point on our virtual moon. And then the data from the sensors, which we effectively turn to

[04:04] a string of random ones and zeros, each of those reorientates our virtual rover. And then it takes a step in a new random direction. And each time it moves on the surface of the virtual moon, we calculate

[04:17] how far away it is from an axis. Move again, calculate, move, calculate. So as we move our virtual rover around the sphere, we just keep recalculating distance to the axis, move it, calculate the distance,

[04:30] move it, calculate the distance. And that running total of the distances will give us the average distance of a point anywhere on the sphere to an axis, which will give us pi on four. So we just track that for the entire duration of the mission. At the end, we multiply the average by four. And we

[04:47] get our lunar pi. But we can do slightly better. We can actually converge in on pi a little bit more efficiently. If for every step, instead of just calculating one distance to one axis, we calculate loads

[05:00] of distances to loads of axes. And to arrange them, we're going to base it on an acosahedron. And that's because we get loads. There are 12 vertices and 20 faces on an acosahedron. And all of them pair up.

[05:13] So for example, on a D20, if you roll it, one face will be on the table and one face will be facing up. They always pair up. It makes for a good dice. And so the 12 vertices of an acosahedron

[05:26] double up to give us six axes. And the 20 faces give us another 10 axes for a total of 16 axes. And if you're wondering why we're using an acosahedron and its vertices and its faces specifically,

[05:42] it's because my friend Colin Beverage, who has helped me spend all the money on the mission, not on the VFX. Yes, Colin thought it would be very funny to base our lunar coordinate system, our set of axes on a football because of my prior history with football. It's a whole thing,

[06:00] but the point is there are 32 patches on a football or a truncated acosahedron. And that gives us our 16 axes. The whole thing is based on an acosahedron happens to be a bit footbally.

[06:12] Thanks Colin. So here's the plan. The virtual rover takes one random step, calculates its distance to 16 axes, another random step, 16 axes, and so on. Now if you're wondering why we're not doing a hundred or maybe a thousand axes, it's because if you're keeping

[06:27] the points still and then you've got infinitely many axes, you're basically recreating the integral from before. But now you're moving the axis all over the entire surface of the sphere, so I needed something in the middle enough axes so it would converge reasonably quickly,

[06:42] but few enough so it was still dependent on the random walk. And 16 from an acosahedron felt like a good, justifiable number. If you're one of the mission backers, you will have already seen the mission patch with our incredible logo on it. This was designed by Turner Prize winning artists.

[06:58] Keith Tyson, big fan of Keith's work, and Keith watches these videos. Thanks Keith. So I like 16 meters cubed of ocean Atlantic. I don't know why it pleases me so much. The people watching these

[07:11] videos, you might like shadow from a higher dimensional space, with hole. The hole, the hole really makes it in my opinion. But Keith designed this, and this is why the design is a moon inside an acosahedron

[07:26] inside another moon. The outer moon is the actual moon the rover will be on. Inside that, we had the virtual moon will be driving around on, and between the two is an acosahedron

[07:39] showing us the axes will be measuring against. So that's the mission. That's how we're going to calculate pi. A reminder that we are the lowest priority mission on the lowest priority rover. But

[07:55] the point is we're going to the moon, and whenever the rover is not doing real science when it's got some downtime, it will start running our code, and we'll start calculating pi with our virtual rover. And we'll continue its drive around the virtual moon for as long as the mission lasts. And I

[08:10] just like the fact, like whenever the rover goes to sleep because we get the downtime, right? It starts to dream of a virtual rover roaming a virtual lunar scape calculating pi for us. Ah, it's all

[08:24] come together so well. Thank you so much everyone who backed it. However, there is one last mild mathematical issue that we have to deal with. Let me show you a simulation we did to get a sense of

[08:38] how likely we are to get a good value of pi. And by good value, I mean 3.14. Annoyingly, like almost everyone knows pi is 3.14. People know many more digits, and they forget just what a ridiculous

[08:52] level of precision that is. So people aren't impressed by 3.2 even though they should be. So here's our virtual moon, and the dot is where the rover is going to start, and I set the virtual rover going, and we're now moving on a random path around the moon. We're using simulated data. Hopefully this is

[09:09] pretty much what we'll get on the moon. At the top, you can see how many steps the rover has taken, and you can see our current estimation of pi, which currently is not bad. I was getting worse, and we realized pretty quickly this is converging way slower than we expected. And the issue is,

[09:24] we're taking very small steps, and while that makes for a nice, fun, continuous path around the lunar surface, the reason it's not converging well is because each new step is basically the same value

[09:36] again. Like, small steps means you barely change value to value, and another way to look at it is, it takes a very long time to cover a lot of the surface. So you can see here, we've now stopped, that was a simulation for 10,000 steps. You can see big gaps of the moon we never got to,

[09:53] and the estimation is 3.07 if I'm being generous. That's not good. So we ran a bunch of simulations for different step sizes to see what would converge fastest. And again, I'm hugely in depth to

[10:08] Colin Beverage, who was working on this Ben Ashford, did loads of simulation work, and of course, my brother, Steve Parker, who was writing the code. And we realized the ultimate step size is about a half of the lunar radius. So if I set that going, and this is just 100 steps, and it looks a bit

[10:28] angular because we're choosing from a finite number of angles each time, after 100 steps, 3.16, it's pretty good. Here's an interactive version of that final frame, and if I drag the moon around,

[10:42] oh, it's not happy. Okay, it's eventually chugging around. If I drag the moon around slowly, so you can see all different sides, you go, actually, for 100 steps, that's pretty good coverage. So because we're taking such big steps, even for only 100 of them, we've sampled most points

[10:59] on the sphere, which is why we're converging quite fast. And for completeness, here's many, many more giant steps on the surface of the moon. Now, we don't know how many we're going to get the mission runs,

[11:12] until it doesn't. And every time it does a lunar observation of pi, a loop, we get sent the data back. And that will happen every five seconds, nothing else important is happening. And at some point,

[11:24] we just won't get any more loop data, because the mission is ended. We don't get a final data dump. But you can see on this simulation, we're coming up on a thousand steps, 3.14. Come on, I'm

[11:39] mildly optimistic. We will get closer to 10,000, than 1,000. But we don't know. So with this method after 1,000, we would have got 3.142 cars. Not bad. I'll take that. So that's the plan. The only mild

[11:52] downside is now, instead of it being this wonderful, adorable little meandering walk that the virtual rover is taking, as the real rover sleeps and dreams of electric moons, because this episode

[12:09] is so big, it's basically teleporting from place to place, picking, I mean, this is why it converges fast, effectively random points on the lunar surface. But that's fine. Officially, we're just telling it to go to this next point, which is 0.5 lunar radii away. And it's finding

[12:29] its own way there. It's pretty, pretty clever, very smart little virtual rover. So that's the mission. That's the whole mathematical plan. A lot of people have been asking about what the rest of the

[12:42] mission is. Like, what's the actual science that's happening? Great question. I've been waiting until everything has kind of been deembargoed, so I can discuss it. And there will be a video later

[12:54] where I look at the engineering and science behind the rest of the Griffin 1 mission. It's all very exciting. And in terms of our specific mission, I don't know if I'm allowed to release the code yet. People have been asking, I'd love to share the code. The moment I'm allowed to,

[13:09] we will do that. That'll be in the future. Speaking of the future, we don't know when the launch is going to be. We're hoping some point this year. As soon as I know more, you will all be the first

[13:21] people. Well, actually people on Kickstarter, you'll be the first people to hear about it. But then everyone else, I'll tell you as soon as possible after that. And so there you go. Now, one final thing on the patches. There's a mistake. I don't know if you didn't want to mention the spot yet.

[13:35] Oh, and it's not. I mean, I know technically we've got the full football thing going on. We could have put in an incorrect football. We've been very funny. Instead, we just went for the Arkansas Hadron because of the faces and the vertices. Point, if you do want a patch, we can't take any more

[13:50] supporters on the mission because we have everyone we need. Thank you so much for the schools who get involved, all the backers on, Kickstarter, all my Patreon supporters. I've got you all in there as well. Make sure you're checking your email to get the details to log in. Check your account.

[14:03] We can't have any more backers. No one can change their names now. It's all been loaded onto the rover. Very soon, the rover we put irreversibly onto the lander. So exciting. But you can still buy patches. If you're already part of the mission, if you log into pie.space, you can buy extra patches.

[14:21] I decided to let any backer get more of them. And if you have a close look at it, you might spot the mistake on it. So when when Keith designed this, the two circles, the blue circle on each side,

[14:34] they were each supposed to have 3.14 stars in them. If you've noticed, this one's got 2.14 stars. One of them and totally my fault because these are being made by the same company who makes all the

[14:46] mission patches for NASA. And I sent through the design. They sent me the proof to sign off. And I didn't notice one star had gone missing. So, I mean, we always knew something was going

[14:58] to go wrong in this mission. It's going to be a bit of a parker mission. Hopefully that's it. It's all the way now. Oh, and one very helpful person pointed out now that we're missing a star. If you look at the patch, you've got a pie symbol. Then you've got seven letters.

[15:13] And then you've got 22 stars. So, that's a constellation prize. A constellation prize. This all thing is ridiculous. And for you end of the video, crew, little teaser about the

[15:29] pie day video, which will be coming out very soon. And it's going to be without flipping a coin, specifically flipping that coin.

⚡ Saved you 0h 15m reading this? Transcribe any YouTube video for free — no signup needed.