You are reading a single comment by @chez_jay and its replies. Click here to read the full conversation.
  • Is there some context to the problem btw? Might shed some light on the expected complexity of the solution.

  • Well doctor, it started when I dreamt I was in a snowstorm in a Minecraft-like world, and wondered what algorithm would be used to control the settling of cubic snowflakes on the landscape...

    If a column of snowcubes start at cell X on a grid, and must each move to a randomly chosen neighbour cell including diagonals, how so you weight the choice so that you end up with roundish, not square snowdrifts?

    When I said 'ratio in terms of pi' I'd assumed there was a simple-ish ratio.

    Thanks for the exact answer @wence !

    I now think a practical way of approximating it would be to draw a bigger version of the original diagram on a grid, and just count squares in the blue and red areas.


    1 Attachment

    • PXL_20240628_151338176.jpg
  • Arcsin(1/3) is roughly a third (it's 0.339 and lots of other numbers) so I'd you only need an approximate result you could just use that figure. It simplifies things a bit.

  • In the limit, a random walk on the lattice is a Wiener process whose probability distribution after time t is normal and rotationally symmetric. So for the discrete case if each block moves for n steps picking a direction uniformly at random at each step then you would end up with an approximately circular "pile"

  • Ah cool! I thought it was an exam question or something with the result being in terms of pi.

    Looks like you found your answer though! Also, not sure if it'll be useful for this case, but have you seen this sort of thing?

    https://donatstudios.com/PixelCircleGenerator

About

Avatar for chez_jay @chez_jay started