Saturday, February 01, 2020

[pfioqnmi] Angle of repose in a 3D blocks world

Consider a 3D world of composed of cubical blocks like Minecraft but which has a limitation on the angle of repose for terrain or structures.

We consider trying to decide whether a given block violates this constraint.

If the critical angle (with respect to horizontal) is less than 45 degrees, consider every empty block (air block) in the plane one block below the given block.  Calculate the slope from each air block to the given block then see if its angle is too steep.  If the slope to any air block is too steep, the given block violates the maximum angle of repose.  (We imagine the given block will roll into the empty block.)  Obviously the algorithm can be optimized to search just a disc below the given block instead of the whole plane.

If the critical angle is greater than 45 degrees but less than 90, consider a 3x3 column of blocks below the given block.  Air blocks in that column can yield a repose violation.  Somewhere in here is an assumption that all blocks have the same maximum angle of repose, and any block that violates it disintegrates into an air block, which can yield further blocks exceeding the repose maximum.

An air block affects an upside down cone shaped region above it.

If the critical angle is greater than 90 degrees, then the question becomes about how far a block can be cantilevered over empty space.  (In reality this would depend on the amount of weight above the block, but we ignore reality in favor of entertaining game play.)  Not sure about the following:

If the critical angle A is greater than 90 degrees, consider a right circular cone with opening angle 2*(A-90) below the given block.  If there is a path of solid blocks from the given block to a block known to be stable (perhaps bedrock, perhaps magic) staying within the cone, then the given block is also stable.

Note that there is a sudden change in definition at 90 degrees.  Below 90, any air block within a cone can destroy stability.  Above 90, any path within a cone can save stability.

If the critical angle is greater than 180 degrees, then the above construction still works but with a bizarrely shaped cone with opening angle over 180 degrees.  The given block could be part of an icicle or stalactite.  The path of solid blocks could lead to a (magically) stable block above (at a higher height, not necessarily directly above) the given block.

Critical angles of repose greater than 270 degrees do not make sense.