In talking about his late-night walks working on physics problems, Richard Feynman (who won a Nobel prize in physics) wrote:
On earlier occasions I was often stopped by the police, because I would be walking along, thinking, and then I’d stop — sometimes an idea comes that’s difficult enough that you can’t keep walking; you have to make sure of something. So I’d stop, and sometimes I’d hold my hands out in the air, saying to myself, “The distance between these is this way, and then this would turn over this way…”
I’d be moving my hands, standing in the street, when the police would come: “What is your name? Where do you live? What are you doing?”
“Oh! I was thinking. I’m sorry; I live here, and often go to the restaurant…” After a bit they knew who it was, and they didn’t stop me anymore.
(That’s from Surely You’re Joking, Mr. Feynman! — a book I’m finding alternately amusing and irritating. Irritating just in terms of some of the sorts of things he seemed to find “cool”, but mostly interesting and amusing.)
Except of course this whole scenario tends to work differently if you’re not a well-known physics genius, I suspect. (And no, I’m making no statements about Feynman’s neurology here. Just found it interesting that being deep in thought about physics problems also can get the cops suspicious, among many other things. And now I will go to bed, because I have to get up very early to get my wisdom teeth removed.)