How this works: First of all, sadly, Scratch doesn't allow lots of digits, so... yeah. So, first of all I start with i=360, which means 360 sides. I show how many sides by using the pen colors. Then, I calculate the diameter, which can be calculated by using the formula sqrt(a^2+b^2), or in this case, where a is x and b is y. btw this is the Pythagorean Theorem. Then, since the circumference is always 360 because I said so (no jk it's because I used 360/i, so repeating i is basically *i, which cancels out the 2 i's to get 360. Then, using the ratio for pi: circumference/diameter, we get the value closer and closer to pi. ips is how many frames it calculated in 1 second (basically fps) it should stay around 30.
Thx to @-ScratchenCoder- for telling me that you could make a pi calculator, which then made me think >:) so yeah after some simple thinking I came up with this! You'll need to wait for a bit... it's lots of calculation.