You are reading a single comment by @mmccarthy and its replies. Click here to read the full conversation.
  • 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.

  • Thanks @mmccarthy and @wence. I think I will play around with some basic graphics code. My maths isn't great though (e.g. I found Bresenham's circle drawing algorithm, but couldn't really read it) so needs to be fairly simple algorithms.

About

Avatar for mmccarthy @mmccarthy started