Posted by: zyxo | August 15, 2008

## The family of PI

Some years ago, in a discussion with one of my colleagues, we mentioned the number PI. Sure, you know this is a mathematical constant which represents the ratio of any circle’s circumference to its diameter in Euclidean geometry.
My colleague said : ” For a circle, PI equals 3.1459 “.
“I know”, I said, “but … for a circle ??? Is PI not allways ‘for a circle‘ ? Is there a PI for other geometrical shapes ?”
So we started to discuss the subject and, since a circle is the limit of a polygon with the number of angles approaching infinity, we decided that it must be possible to calculate some sort of PI for non-circular polygons.

What follows is the result. I leave it to the reader to judge the mathematical meaning or relevance, but at the time, I found it interesting and fun.

Let us start with the simple definition : PI equals the circumference divided by two times the radius of the circle. How could we calculate that for polygons ? I had to make a choice : either drawing the circle outside the polygon, touching all its corners, or inside the polygon, touching its sides. I chose for the former one, because you can still draw that circle for a polygon with two angles (a line !).

And then I started to calculate, and frankly, do not ask how I got to it, but recently I discovered the spreadsheet I made at that time and from it I can see I came up with the following formula :

PI_n = n times (cosinus(180 minus 360/n))/2

That gives values for PI_n for polygones :
with two angles : 2
with three angles : 2.598
with four angles : 2.828
with five angles : 2.939
with six angles : 3.000
with ten angles : 3.090
with twenty angles : 3.129
wiht thirty angles : 3.136
with fourty angles : 3.138
with 100 angles : 3.141
with 500 angles : 3.14157
with 1,000 angles : 3.141587
with 10,000 angles : 3.14159260
with 100,000 angles : 3.14159265
with 1,000,000 angles : 3.14159 26536 3325

As PI equals 3.14159 26535 89793 23846 26433 83279 50288 41971 69399 37510 and something more, according to wikipedia, you can see that my formula exaggerates it a little bit : my tenth digit after the decimal point is 6 in stead of 5.
But for the rest it looks like a good approach.
And the beauty of it is that it works also with decimals !
So you can calculate PI for a polygon with for example 7.359 angles !

Here a plot of PI_n against the number of angles of the polygon : ## Responses

1. Tell your friend that pi = 3.14159265…
{"ft_lang_label":"__label__en","ft_lang_prob":0.8734528,"math_prob":0.9475293,"size":2469,"snap":"2019-51-2020-05","text_gpt3_token_len":658,"char_repetition_ratio":0.15780933,"word_repetition_ratio":0.0,"special_character_ratio":0.31510735,"punctuation_ratio":0.15789473,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9939294,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,2,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-18T19:11:04Z\",\"WARC-Record-ID\":\"<urn:uuid:e223059a-80dd-4f6b-b95d-218b9df5cb96>\",\"Content-Length\":\"106433\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:7c792c44-39a3-4f4d-bcca-367a4eb386be>\",\"WARC-Concurrent-To\":\"<urn:uuid:a89d8e2d-3fb3-4f5e-8bcb-dc0db820c980>\",\"WARC-IP-Address\":\"192.0.78.13\",\"WARC-Target-URI\":\"https://zyxo.wordpress.com/2008/08/15/the-family-of-pi/\",\"WARC-Payload-Digest\":\"sha1:O5O5D2A5UC5H6INAXZM7PYC723RGJXVV\",\"WARC-Block-Digest\":\"sha1:IVUBR2ABALQ3DXYHLFGBIVWAT55TQSYW\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579250593295.11_warc_CC-MAIN-20200118164132-20200118192132-00331.warc.gz\"}"}