News for hackers. Stuff that matters.
Re:Approximating Pi Using a Cake? by arjvik on Wednesday March 15, 2023 @12:27AM (#35163876)
Anyone up to count sprinkles?

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

Re:Approximating Pi Using a Cake? by sargstuff on Wednesday March 15, 2023 @12:37AM (#35163932)
Are simulation results limited to data not ingested?
Re:Approximating Pi Using a Cake? by rob74 on Wednesday March 15, 2023 @05:37AM (#35165787)
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...
Re:Approximating Pi Using a Cake? by glapworth on Wednesday March 15, 2023 @06:10AM (#35165991)
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?
Re:Approximating Pi Using a Cake? by sargstuff on Wednesday March 15, 2023 @04:54PM (#35174570)
Think the follow up article addresses the sprinkle variations using lambda calculus.
Re:Approximating Pi Using a Cake? by eurasiantiger on Wednesday March 15, 2023 @09:33AM (#35168085)
Just take a better picture and code it up
Re:Approximating Pi Using a Cake? by sargstuff on Sunday March 19, 2023 @11:57PM (#35227098)
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.