Interestingly, many hallucinatory geometric patterns fall out of a simple mathematical model of V1. This is a great paper that is less known than it should be:
Geometric visual hallucinations, Euclidean symmetry and the functional architecture of striate cortex
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1088430/pdf/TB0...