How Infinite Spaces Shape Simple Rules: The Math Behind UFO Pyramids