Hacker News new | past | comments | ask | show | jobs | submit login
Approximating Pi Using a Cake? (ntietz.com)
45 points by earthboundkid on March 14, 2023 | hide | past | favorite | 21 comments



Matt Parker on YouTube has done a number of videos calculating pi with pies, a balancing beam, a drifting car, a pendulum and probably more:

https://www.youtube.com/watch?v=ZNiRzZ66YN0

https://www.youtube.com/watch?v=S26_O2B8h8k

https://www.youtube.com/watch?v=_ZbUyS2IRMo

https://www.youtube.com/watch?v=qYAdXm69l8g


Anyone up to count sprinkles?

Let's see if this simulation worked in real life!


I love this, but I thought that the sprinkles need to be the same length in order for the calculation to work? Looking at the image in the article, the length of the sprinkles seem to vary with some being just dots and the others are of a similar length. I wonder if it would work if you discounted those smaller dot sprinkles?


Think the follow up article addresses the sprinkle variations using lambda calculus.


Are simulation results limited to data not ingested?

For non-automated, real life counts, would be good to have the standard deviation of ingested data / time to arrive at total count.


I'm just imagining that someone really did this and after all that effort realized how spectacularly off the value they got is, then proceeded to doubt and redo their calculations, only to later realize that the method is at fault...


Just take a better picture and code it up


Way to much time/effort ;-)

1) use sprinkles of all one color shade (other than frosting color).

2) take picture with filter color of sprinkles.

3) either a or b

   a) print out the picture so that sprinkle spots allow light to shine through & non-sprinkle area blocks light shinning through.
   
   b) show picture full screen.
4) Use lens to focus light from 3a or 3b onto photo diode (generate sound or light intensity)

5) Figure out a chart showing the average size / number of sprinkles based on light intensity / generated sound.

chart calibration test case: use tape/paper to block more and more of a cake size screen holes in order to calibrate the light reduction ratio.

aka 3 meters of sprinkles gives 90% reduction in light for given cake size. ~1 screen hole (1mm average sprinkle size) over 3m -> 3000 sprinkles.


Use a pendulum and a clock


one true way to condense the tock, awk/print the relevant Unicode symbol related to number of tics.


The author confuses circle and disk


Colloquial English doesn't make as strict of a distinction as mathematical usage does. It doesn't introduce any ambiguity here.


Given the subject matter colloquial English is not appropriate here.


Well the subject matter is someone baking a cake for “pi day” - I think colloquial English is probably fine in this context :)


The article isn't even using π, but 'pi'. I don't think they strove for rigour and formality.


So, if the article was serving up on a raspberry pi instead of sprinkles on frosting, that would make things more rigourous/formal? aka rasberry pi has been put through some rigorous/formal testing methods.

Or per ' I don't think they strove for rigour and formality.', what was done to rule out the article being baked & served using a qem rasberry pi?[0]

[0] emulating a rasberry pi with qem : https://gist.github.com/plembo/c4920016312f058209f5765cb9a3a...


Huh? Sorry, I'm a bit dumbfounded.

What does the Raspberry Pi have to do with anything here?


Semiotic breakdown:

Ok, jumping into the deep end of the pool, potential semiotic [0] interpretations:

bug screen (Poisson) & computing grid (Fourier).

Permits one to crunch the numbers without eating the sprinkles. aka gets around the 'You can't have your cake and eat it'[1] issues.

symbolically supports the no formalism approach: a) Pi is irrational number. b)Raspberry is stand in for Bronx cheer [2][3].

Perhaps not being able to eat the cake & complete the project is a good idea (less sugar high & more realistic interpretations/results).

[0] : https://www.uvm.edu/~tstreete/semiotics_and_ads/terminology....

[1] : https://en.wikipedia.org/wiki/You_can%27t_have_your_cake_and...

[2] : https://www.collinsdictionary.com/us/dictionary/english/bron...

[3] : https://www.urbandictionary.com/define.php?term=Bronx%20Chee...


Platters and donuts confusion would be more concerning, as typical hard drives take more than one byte to properly digest.

The article did take a top down approach, instead of a bottom [platter] up approach.


No, you refused to infer the plain meaning. Author uses words like on, outside, inside and you pretend they don't apply.


Plain logical references would imply no sprinkles on the frosting & one very uninteresting/plain frosted topic.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: