Calculating PI In Terraria
Pi is probably one of the most well-known irrational numbers there are many different ways of calculating this but I want to use Terraria how could someone possibly use Terraria a 2d Sandbox game composed of blocks to calculate one of the most popular mathematical constants well in this
Video I will show you how to calculate pi in Terraria and how you could do the same to answer the question of how I’m going to use Terraria to calculate something in math relating to round objects we first need to understand how Pi is calculated there are many
Different ways of calculating Pi all basically requiring a long operation of calculations but these won’t work area the easiest way is to use an equation with pi in it which there are many of probably the most common instance of Pi in an equation is getting the area of a
Circle the equation stat that the area of a circle is equal to piun * the radius squar if you rearrange the equation you end up with an equation that can solve for pi with this equation all we need to do is get a circle into area and then calculate pi we could hand
Build a circle and use those values for the numbers but I think it’s a lot more fun if instead we remove circles using bombs with bombs we are able to get the area and the radius of a circle a normal bomb can yeld up to 50 blocks and has a
Blast radius of four tiles using their rearranged equation we get Pi kind of we get 3.125 which is close to Pi but not close enough we can get in a closer approximation using dynamite dynamite gives us a total of 154 blocks and with a radius of seven tiles we get
31429 most middle schools will teach that Pi is equal to 3.14 this number is technically Pi but the 29 at the end is incorrect we could drop them but I want to do more than two digits of pi we just need a biger explosion explosive the
Wire activated bomb has a radius of 10 tiles and has an area of 314 blocks we get 3.14 this seems like it’s further away from PI than before however it doesn’t really matter the larger the explosion radius the higher Precision of Pi we can get there are many nukes and
Rockets but those don’t have a big enough explosion range and I need something bigger t-on loader was my best bet if I wanted larger explosives so I made a mod that added a few new bombs that I could test and get a better approximation value 4 Pi the FR bomb had
A radius of 20 tiles the average calculation of Pi was 31397 however other averages were closer giving us 31418 the radius of 20 was better however not good enough I created another bomb with a radius of 60 blocks this bomb resulted in an approximation of Pi being
31414 this is closer than before but still not good enough an explosion with a radius of 100 tiles calculated p as 3.1415 73 this is four correct digits of pi but like before it’s still not good enough moving on to a radius of 1,000 blocks the result approximated pi to
3.141592 at this point we have six digits of pi probably around where most people memorize but is it possible to get more the short answer is yes but the longer answer is no with these large radi the calculation time quickly skyrockets with a radius of 10,000 we get
3.1415926 this took 20 seconds to find which does not seem too long but it’s only 7 digits of pi testing it with a radius of 100,000 it took over 80 seconds but the problem is the number was actually further away from PI than before with pi being calculated at
3.1415 925 seemed like the larger numbers would have some errors but to make sure this was the case I tested it with a radius of 500,000 tiles for reference this is the equivalent to the length of just under 60 large worlds and after waiting 38 minutes for the
Calculation to be completed I got 3.1415 927 this was still further away than before if I did the calculation multiple times I could have gotten an average but I didn’t have time to wait there for multiple hours so is this the best we can get 3.1415926 7 digits of pi accurately
Calculated in Terraria probably not but I’m not sure how I can actually improve this I tried doing some complicated math but the values were always off if anyone knows a better way to calculate pie and Terraria I’d love to read it in the comments or watch it if you upload a
Video but at the end of the day now you know Terraria can be used to calculate p
In this video i use terraria to calculate one of the most well known mathematical constant. PI can be calculated using a single bomb, using the radius and the total amount of blocks affected.
7 Comments
Honestly great video, you deserve more views with the quality of the editing and such. I feel like if you explained the formula with the first few values it would’ve been easier to understand.
Nice vídeo
Great video hope the algorithm picks it up
313 views… almost there
Good vid for 14th March.
Great Video 👏
underrated asf