home.social

#genuary17 — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #genuary17, aggregated by home.social.

  1. #genuary17 - Pi is 4? When contemplating how to approach this one, I recalled the fascinating Monte Carlo methods for calculating pi, like counting how many random dots fall inside a circle, or Buffon's needle experiment. A method unfamiliar to me until now method is based on random walk. I had to code it up and try it, and then thought about what would have to change to make pi come out to be 4. Instead of a random walk where each step is randomly either -1 or 1, the steps would need to be approximately -0.885 or +0.885. This image visualizes the difference, with the cream color walks for the regular pi, and the turquoise paths the "pi=4". #pi #randomwalk #genuary #genuary2025

  2. #genuary17 - Pi is 4? When contemplating how to approach this one, I recalled the fascinating Monte Carlo methods for calculating pi, like counting how many random dots fall inside a circle, or Buffon's needle experiment. A method unfamiliar to me until now method is based on random walk. I had to code it up and try it, and then thought about what would have to change to make pi come out to be 4. Instead of a random walk where each step is randomly either -1 or 1, the steps would need to be approximately -0.885 or +0.885. This image visualizes the difference, with the cream color walks for the regular pi, and the turquoise paths the "pi=4". #pi #randomwalk #genuary #genuary2025

  3. #genuary17 - Pi is 4? When contemplating how to approach this one, I recalled the fascinating Monte Carlo methods for calculating pi, like counting how many random dots fall inside a circle, or Buffon's needle experiment. A method unfamiliar to me until now method is based on random walk. I had to code it up and try it, and then thought about what would have to change to make pi come out to be 4. Instead of a random walk where each step is randomly either -1 or 1, the steps would need to be approximately -0.885 or +0.885. This image visualizes the difference, with the cream color walks for the regular pi, and the turquoise paths the "pi=4". #pi #randomwalk #genuary #genuary2025

  4. #genuary17 - Pi is 4? When contemplating how to approach this one, I recalled the fascinating Monte Carlo methods for calculating pi, like counting how many random dots fall inside a circle, or Buffon's needle experiment. A method unfamiliar to me until now method is based on random walk. I had to code it up and try it, and then thought about what would have to change to make pi come out to be 4. Instead of a random walk where each step is randomly either -1 or 1, the steps would need to be approximately -0.885 or +0.885. This image visualizes the difference, with the cream color walks for the regular pi, and the turquoise paths the "pi=4". #pi #randomwalk #genuary #genuary2025

  5. #genuary17 - Pi is 4? When contemplating how to approach this one, I recalled the fascinating Monte Carlo methods for calculating pi, like counting how many random dots fall inside a circle, or Buffon's needle experiment. A method unfamiliar to me until now method is based on random walk. I had to code it up and try it, and then thought about what would have to change to make pi come out to be 4. Instead of a random walk where each step is randomly either -1 or 1, the steps would need to be approximately -0.885 or +0.885. This image visualizes the difference, with the cream color walks for the regular pi, and the turquoise paths the "pi=4". #pi #randomwalk #genuary #genuary2025

  6. Illustrated fake-proof that π=4

    The length of the green border is constant; always 4 times the diameter of the circle yet it can be made to approach arbitrarily close to the circumference
    #genuary #genuary17 #genuary2024 #CreativeCoding #Processing #Mathsodon #maths #mathematics #geometry

  7. """
    sketch_2022_01_17 #genuary #genuary17 #Python #Processing

    Code for #py5 (py5coding.org) imported mode

    Recursive grid - I'm always grateful for Takao Shunsuke's inspiration.

    #トゥートProcessing #TootProcessing
    """

    def setup():
    size(1024, 1024)
    no_loop()

    def draw():
    background(0)
    grid(0, 0, width, 4)
    save_frame('###.png')

    def grid(grid_x, grid_y, grid_size, n):
    cell_size = grid_size / n
    for i in range(n):
    x = grid_x + i * cell_size
    for j in range(n):
    y = grid_y + j * cell_size
    if cell_size < 20:
    fill(x % 255, 200, y % 255)
    circle(x + cell_size / 2,
    y + cell_size / 2,
    cell_size)
    elif n == 1:
    fill(0, 0, 200)
    square(x, y, cell_size)
    else:
    next_n = int(random(1, 5))
    grid(x, y, cell_size, next_n)

    def key_pressed():
    redraw()