Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » The true value of PI

This thread is locked; no one can reply to it. rss feed Print
 1   2 
The true value of PI
Arthur Kalliokoski
Second in Command
February 2005
avatar

I was reading this page, which is full of tongue-in-cheek jokes about the value of PI, and it occurred to me that the well known value would only apply to Euclidian universes. It seems to me that with the positive curvature of space, then the larger the circle is, the lower the value of PI would be for that circle. Comments?

[EDIT]

As an example, a circle is actually on the surface of a sphere, and the diameter would also follow the sphere (since it'd be the shortest distance, whereas a chord would not be shortest). Suppose the circle was made into a great circle of the sphere, then the diameter would necessarily be 1/2 of the circumference.

They all watch too much MSNBC... they get ideas.

Bruce Perry
Member #270
April 2000

π(0,R) = 3.14159265358979323846..., R ≠ 0
π(r,R) = R/r·π(0,R)·sin r/R

[EDIT]
I'm going to use this post to test the maths stuff, since the preview won't seem to render any equation that isn't the specific quadratic formula example from the help page.

π(r,R) = \frac{R}{r}·π(0,R)·sin \frac{r}{R}

[EDIT 2]
Didn't work :(

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

SiegeLord
Member #7,827
October 2006
avatar

You don't need to go to different universes to get a different value for PI, just choose a different distance metric. Remember that a unit circle is a set of all points that are distance 1 from the center, while PI is circumference over diameter.

E.g with the Manhattan distance circles look like diamonds and PI is 4.

As for the PI on a sphere... you'd need a bunch of math to compute it. I don't feel like it, so here's a program that does it for you:

#SelectExpand
1#include <math.h> 2#include <stdio.h> 3 4double sq(double a) 5{ 6 return a * a; 7} 8 9double great_circle_distance(double phi_s, double lambda_s, double phi_f, double lambda_f) 10{ 11 double delta_phi = phi_f - phi_s; 12 double delta_lambda = lambda_f - lambda_s; 13 14 double y = sqrt(sq(cos(phi_f) * sin(delta_lambda)) + sq(cos(phi_s) * sin(phi_f) - sin(phi_s) * cos(phi_f) * cos(delta_lambda))); 15 double x = sin(phi_s) * sin(phi_f) + cos(phi_s) * cos(phi_f) * cos(delta_lambda); 16 17 return atan2(y, x); 18} 19 20int main() 21{ 22 double radius = 0.4; 23 24 double num_divisions = 10000; 25 double delta_lambda = (2 * 3.14159265358) / num_divisions; 26 double circumference = num_divisions * great_circle_distance(radius, 0, radius, delta_lambda); 27 28 printf("PI is %f\n", circumference / (2 * radius)); 29 30 return 0; 31}

Note that I get that PI is radius dependent, in the way OP described... but I may have made a mistake :P.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Karadoc ~~
Member #2,749
September 2002
avatar

it occurred to me that the well known value would only apply to Euclidian universes. It seems to me that with the positive curvature of space, then the larger the circle is, the lower the value of PI would be for that circle. Comments?

Back when I was doing 1st year physics at university, my lecturer told story to make this point.

The story when roughly like this.

A mathematician tells a physicist about a number called 'pi' and says that one can calculate the exact circumference of a circle using the formula C = 2*pi*r; and the exact value of pi is 3.1415[...], defined by such-and-such formula.

The physicist likes the idea, and but being a physicist rather than a mathematician, he sets out to test it in the real world.

First, he gets a piece of paper and a string. He pins the string in place and uses it to draw a circle. (The radius of the circle is the length of the string.) He then measures the radius, and measures the circumference of the circle (perhaps using a second piece of string, or whatever).. And he uses the formula to compare them and finds that the formula is exactly right.

So, the experiment supports the theory, but the physicist wasn't satisfied yet. He wants to try a bigger circle; so he goes to a football field with a really long string / rope and repeats the experiment. Again, the formula is accurate, and the so the C = 2*pi*r theory is looking pretty sound.

But the physicist still isn't satisfied. He decides to do one last experiment, on a truly grand scale. He gets an extremely long rope for this one, and makes a really huge circle - spanning the area of several large countries. The physicist is careful to make sure that there are no hills or anything in the way to disrupt the experiment (perhaps he does it in the ocean or something, who knows... the point is that the circle is really really big.) --- And, to the physicist's surprise, he finds that the formula fails! The circumference is noticeably less than that predicted by the formula.

Good thing he tested it!

(The reason the formula didn't work is because the earth is not a flat plane. It's a sphere...)

I thought it was a pretty dumb story at the time, because pi is a mathematical entity. It's value isn't determined experimentally; but rather is defined mathematically. The definition isn't something one tests. It is true by definition (because it's a defined such). The experiments in the story don't show that the maths was wrong, they only show that the formulas were misapplied, because they assume the earth was flat.

...

But that was some years ago, and since then the story has kind of grown on me. I think it highlights a few important points about science and physics and our understanding of the world, and the relationship with all of those things to mathematics. Maths may be absolutely perfect, and never ever wrong, but for it to be of any use in the real world, it has to be used to describe real world things - and it isn't always easy to find the correct mathematical model to describe the things one wants to describe. (That's essentially what physics is all about.) -- As for our understanding of the world; I think the story highlights that although we might be confident that our understanding is sound - it may later turn out that our understanding was actually incomplete - and that we always need to be aware of that possibility.

For example, consider Galilean relativity vs Special relativity. Galilean relativity may seem pretty natural, and it seems to be accurate for essentially everything we see and do. But when we start looking at extremely fast things, it turns out that Galilean relativity is completely wrong. It was just an approximation; and the approximation breaks down for really fast stuff.

So... despite not liking the story at first, I do think it's helped me understand and become more comfortable with the fact that essentially everything I think I know about the physical world is really 'just an approximation'.

-----------

bamccaig
Member #7,536
July 2006
avatar

I think the story is dumb for at least two reasons:

  • Firstly, it's completely unreasonable to reliably make a perfect circle with a rope surrounding multiple countries (in the hypothetical situation where the Earth is flat). The infrastructure to actually make this possible would be a huge undertaking and completely impractical for such an experiment. :-X

  • Secondly, it seems pretty biased to believe that a Physicist would not understand that the Earth's surface is not flat (well, sure, maybe many years ago), and that the rope would then not represent a perfect circle. :-/

Karadoc ~~
Member #2,749
September 2002
avatar

Sure, I agree with both of those points. The story isn't plausible. But I think the core point of the story is a sound one. (As I said, I thought it was a stupid story when my lecturer told it as well.)

-----------

LennyLen
Member #5,313
December 2004
avatar

bamccaig said:

I think the story is dumb for at least two reasons:

Congratulations for taking the ogy out of analogy. ;)

Johan Halmén
Member #1,550
September 2001

bamccaig said:

Secondly, it seems pretty biased to believe that a Physicist would not understand that the Earth's surface is not flat (well, sure, maybe many years ago)

Eratosthenes measured Earth's circumference in 3rd century B.Chr. Euclid was some 50 years older.

I would tell Karadoc's story to my students, if I taught maths or physics. It's dumb, but it still might trigger some thinking. I teach music and music history. To the history part I include some history of ideas, mainly the antique vs. renaissance thing, since it touches art. Karadoc's story can't be true in the same sense as the story about how Eratosthenes measured the circumference of Earth.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Arthur Kalliokoski
Second in Command
February 2005
avatar

I'm pretty sure Karadocs story is more like a parable than actual fact or even apocryphal. A "thought experiment" maybe.

They all watch too much MSNBC... they get ideas.

Bob Keane
Member #7,342
June 2006

The true value of pi is 3. I will pray for your soul if you don't believe it.

By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul.
"Love thy neighbor as much as you love yourself means be nice to the people next door. Everyone else can go to hell. Missy Cooper.
The advantage to learning something on your own is that there is no one there to tell you something can't be done.

Neil Walker
Member #210
April 2000
avatar

bamccaig said:

The infrastructure to actually make this possible would be a huge undertaking and completely impractical for such an experiment

What if you they were giants the size of planets from another universe. That string spanning a flat earth would be like us drawing a circle the size of a dustbin lid.

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

van_houtte
Member #11,605
January 2010
avatar

my apple pie = 22/7

-----
For assistance, please register and click on this link to PM a moderator

Sometimes you may have to send 3-4 messages

Johan Halmén
Member #1,550
September 2001

Mine is 144029661/45846065.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Arthur Kalliokoski
Second in Command
February 2005
avatar

With all those digits in your fractions to remember, you might as well memorize the decimal value anyway.

They all watch too much MSNBC... they get ideas.

Johan Halmén
Member #1,550
September 2001

I guess it's more or less the same which ever fraction you use. 22/7 has 3 digits and it gives you only 3.14.

3 / 1 = 3.0000000000000000
13 / 4 = 3.2500000000000000
16 / 5 = 3.2000000000000002
19 / 6 = 3.1666666666666665
22 / 7 = 3.1428571428571428
179 / 57 = 3.1403508771929824
201 / 64 = 3.1406250000000000
223 / 71 = 3.1408450704225350
245 / 78 = 3.1410256410256410
267 / 85 = 3.1411764705882352
289 / 92 = 3.1413043478260869
311 / 99 = 3.1414141414141414
333 / 106 = 3.1415094339622640
355 / 113 = 3.1415929203539825
52163 / 16604 = 3.1415923873765359
52518 / 16717 = 3.1415923909792425
52873 / 16830 = 3.1415923945335709
53228 / 16943 = 3.1415923980404887
53583 / 17056 = 3.1415924015009380
53938 / 17169 = 3.1415924049158366
54293 / 17282 = 3.1415924082860780
54648 / 17395 = 3.1415924116125322
55003 / 17508 = 3.1415924148960475
55358 / 17621 = 3.1415924181374497
55713 / 17734 = 3.1415924213375437
56068 / 17847 = 3.1415924244971145
56423 / 17960 = 3.1415924276169265
56778 / 18073 = 3.1415924306977261
57133 / 18186 = 3.1415924337402399
57488 / 18299 = 3.1415924367451775
57843 / 18412 = 3.1415924397132304
58198 / 18525 = 3.1415924426450741
58553 / 18638 = 3.1415924455413671
58908 / 18751 = 3.1415924484027520
59263 / 18864 = 3.1415924512298559
59618 / 18977 = 3.1415924540232916
59973 / 19090 = 3.1415924567836564
60328 / 19203 = 3.1415924595115348
60683 / 19316 = 3.1415924622074964
61038 / 19429 = 3.1415924648720983
61393 / 19542 = 3.1415924675058848
61748 / 19655 = 3.1415924701093871
62103 / 19768 = 3.1415924726831244
62458 / 19881 = 3.1415924752276041
62813 / 19994 = 3.1415924777433228
63168 / 20107 = 3.1415924802307655
63523 / 20220 = 3.1415924826904056
63878 / 20333 = 3.1415924851227071
64233 / 20446 = 3.1415924875281229
64588 / 20559 = 3.1415924899070968
64943 / 20672 = 3.1415924922600618
65298 / 20785 = 3.1415924945874427
65653 / 20898 = 3.1415924968896545
66008 / 21011 = 3.1415924991671029
66363 / 21124 = 3.1415925014201855
66718 / 21237 = 3.1415925036492913
67073 / 21350 = 3.1415925058548009
67428 / 21463 = 3.1415925080370872
67783 / 21576 = 3.1415925101965145
68138 / 21689 = 3.1415925123334407
68493 / 21802 = 3.1415925144482157
68848 / 21915 = 3.1415925165411820
69203 / 22028 = 3.1415925186126747
69558 / 22141 = 3.1415925206630235
69913 / 22254 = 3.1415925226925498
70268 / 22367 = 3.1415925247015695
70623 / 22480 = 3.1415925266903915
70978 / 22593 = 3.1415925286593192
71333 / 22706 = 3.1415925306086496
71688 / 22819 = 3.1415925325386738
72043 / 22932 = 3.1415925344496771
72398 / 23045 = 3.1415925363419395
72753 / 23158 = 3.1415925382157353
73108 / 23271 = 3.1415925400713336
73463 / 23384 = 3.1415925419089974
73818 / 23497 = 3.1415925437289869
74173 / 23610 = 3.1415925455315543
74528 / 23723 = 3.1415925473169497
74883 / 23836 = 3.1415925490854169
75238 / 23949 = 3.1415925508371956
75593 / 24062 = 3.1415925525725208
75948 / 24175 = 3.1415925542916234
76303 / 24288 = 3.1415925559947300
76658 / 24401 = 3.1415925576820620
77013 / 24514 = 3.1415925593538385
77368 / 24627 = 3.1415925610102731
77723 / 24740 = 3.1415925626515766
78078 / 24853 = 3.1415925642779543
78433 / 24966 = 3.1415925658896100
78788 / 25079 = 3.1415925674867418
79143 / 25192 = 3.1415925690695459
79498 / 25305 = 3.1415925706382137
79853 / 25418 = 3.1415925721929341
80208 / 25531 = 3.1415925737338921
80563 / 25644 = 3.1415925752612699
80918 / 25757 = 3.1415925767752455
81273 / 25870 = 3.1415925782759953
81628 / 25983 = 3.1415925797636914
81983 / 26096 = 3.1415925812385042
82338 / 26209 = 3.1415925827005990
82693 / 26322 = 3.1415925841501404
83048 / 26435 = 3.1415925855872895
83403 / 26548 = 3.1415925870122043
83758 / 26661 = 3.1415925884250404
84113 / 26774 = 3.1415925898259505
84468 / 26887 = 3.1415925912150855
84823 / 27000 = 3.1415925925925925
85178 / 27113 = 3.1415925939586176
85533 / 27226 = 3.1415925953133033
85888 / 27339 = 3.1415925966567908
86243 / 27452 = 3.1415925979892174
86598 / 27565 = 3.1415925993107203
86953 / 27678 = 3.1415926006214323
87308 / 27791 = 3.1415926019214853
87663 / 27904 = 3.1415926032110093
88018 / 28017 = 3.1415926044901310
88373 / 28130 = 3.1415926057589760
88728 / 28243 = 3.1415926070176683
89083 / 28356 = 3.1415926082663281
89438 / 28469 = 3.1415926095050759
89793 / 28582 = 3.1415926107340284
90148 / 28695 = 3.1415926119533020
90503 / 28808 = 3.1415926131630103
90858 / 28921 = 3.1415926143632653
91213 / 29034 = 3.1415926155541780
91568 / 29147 = 3.1415926167358563
91923 / 29260 = 3.1415926179084073
92278 / 29373 = 3.1415926190719370
92633 / 29486 = 3.1415926202265481
92988 / 29599 = 3.1415926213723435
93343 / 29712 = 3.1415926225094237
93698 / 29825 = 3.1415926236378877
94053 / 29938 = 3.1415926247578327
94408 / 30051 = 3.1415926258693556
94763 / 30164 = 3.1415926269725500
95118 / 30277 = 3.1415926280675102
95473 / 30390 = 3.1415926291543270
95828 / 30503 = 3.1415926302330917
96183 / 30616 = 3.1415926313038933
96538 / 30729 = 3.1415926323668195
96893 / 30842 = 3.1415926334219573
97248 / 30955 = 3.1415926344693910
97603 / 31068 = 3.1415926355092054
97958 / 31181 = 3.1415926365414837
98313 / 31294 = 3.1415926375663066
98668 / 31407 = 3.1415926385837554
99023 / 31520 = 3.1415926395939087
99378 / 31633 = 3.1415926405968451
99733 / 31746 = 3.1415926415926414
100088 / 31859 = 3.1415926425813741
100443 / 31972 = 3.1415926435631176
100798 / 32085 = 3.1415926445379463
101153 / 32198 = 3.1415926455059320
101508 / 32311 = 3.1415926464671475
101863 / 32424 = 3.1415926474216631
102218 / 32537 = 3.1415926483695484
102573 / 32650 = 3.1415926493108728
102928 / 32763 = 3.1415926502457041
103283 / 32876 = 3.1415926511741086
103638 / 32989 = 3.1415926520961532
103993 / 33102 = 3.1415926530119025
104348 / 33215 = 3.1415926539214212
208341 / 66317 = 3.1415926534674368
312689 / 99532 = 3.1415926536189365
833719 / 265381 = 3.1415926535810779
1146408 / 364913 = 3.1415926535914038
3126535 / 995207 = 3.1415926535886505
4272943 / 1360120 = 3.1415926535893890
5419351 / 1725033 = 3.1415926535898153
42208400 / 13435351 = 3.1415926535897722
47627751 / 15160384 = 3.1415926535897771
53047102 / 16885417 = 3.1415926535897811
58466453 / 18610450 = 3.1415926535897842
63885804 / 20335483 = 3.1415926535897869
69305155 / 22060516 = 3.1415926535897891
74724506 / 23785549 = 3.1415926535897909
80143857 / 25510582 = 3.1415926535897927
245850922 / 78256779 = 3.1415926535897931

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Tobias Dammers
Member #2,604
August 2002
avatar

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

Arthur Kalliokoski
Second in Command
February 2005
avatar

I guess it's more or less the same which ever fraction you use. 22/7 has 3 digits and it gives you only 3.14.

Pi is approximately equal to 314159/100000ths so there! It's about 0.999999155336 of the true value.

They all watch too much MSNBC... they get ideas.

bamccaig
Member #7,536
July 2006
avatar

Arthur Kalliokoski
Second in Command
February 2005
avatar

Quote:

Arthur wins the thread, IMO. 8-)

Only for circles that are relatively small compared to the universe. :P

They all watch too much MSNBC... they get ideas.

Tobias Dammers
Member #2,604
August 2002
avatar

my apple pie = 22/7

Mine is 3.1415. If I need more digits, I look it up, derive it, or use the constant that is built into every sane programming language (and also a few insane / mentally unstable ones). acos(-1) works well, too.

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

Johan Halmén
Member #1,550
September 2001

3.1416

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

Bruce Perry
Member #270
April 2000

3.142536475869708...

Wait, maybe I'm thinking of this ???

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Neil Roy
Member #2,229
April 2002
avatar

{"name":"606279","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/2\/a2627110353a0597b6c9f641f342400d.jpg","w":259,"h":194,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/2\/a2627110353a0597b6c9f641f342400d"}606279
MMmmmmm.... PI....... :P

---
“I love you too.” - last words of Wanda Roy

Thomas Fjellstrom
Member #476
June 2000
avatar

{"name":"raspberrypi.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/8\/7873cb7954f4a66d40631d5fa84cd745.jpg","w":652,"h":456,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/8\/7873cb7954f4a66d40631d5fa84cd745"}raspberrypi.jpg

MMmmmmm.... PI....... :P

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Bruce Perry
Member #270
April 2000

{"name":"raspberry-pie-slice.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/b\/ebdc9bc0ce799a6ee3a2cc2a531cfde4.jpg","w":511,"h":342,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/b\/ebdc9bc0ce799a6ee3a2cc2a531cfde4"}raspberry-pie-slice.jpg

<3

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

 1   2 


Go to: