The neuroscience and mathematics of hallucinatory thought has been progressively studied and elaborated for a while. If you are interested, here is a more approachable introduction to this topic in the Quanta magazine (from 2018) - https://www.quantamagazine.org/a-math-theory-for-why-people-...
An older and more math oriented approach to this same topic exists in this introduction from 2009 - https://plus.maths.org/content/uncoiling-spiral-maths-and-ha...
The underlying theories dont seem to have changed too much from what we have known for some time. But it's nevertheless very fascinating.