This visual imaginations comment reminded me of Dr. Temple Grandin, who who written books about her own visual imagination https://en.wikipedia.org/wiki/Thinking_in_Pictures
I think my own mind is visual. I can prototype physical inventions in my head. Ex: Once, given a need for a tool that I didn't have, I considered the parts I had on hand, and recreated the tool using spare parts. The time from realizing the need for the tool, to having a working replacement was a few minutes.
When I code, before I start planing on paper, I can see the various functions that I need to write or algorithms that I'll have to use.
It is not very common among scientists, but I am willing to bet that a lot of people who end up in the visual arts (i.e. who put these scenes in movies) experienced math in a way that matches the visual metaphor when they were in school.