A great book on spatial simulation is The Art of Mixing by David Gibson. Older but forever relevant
A great book on spatial simulation is The Art of Mixing by David Gibson. Older but forever relevant
The closest analogue I can think of is how due to practice now anyone can close their eyes and imagine typing entire essays how they know exactly where the keys are. Try it.
Then you have directional localisation based on delay between ears, difference in volume & properties of reverberations. Things to the sides are going to arrive in either ear at different moment. Add source if first echo & you have confirmation that a sound is coming from either right or left. The more directly to the side is the sound, the bigger the delay between ears is, so you get approximate angle.
Now we consider sound muffling, caused by shape of our head & ears. Things in front are going to sound clearer in the opposite ear, than sounds from the back.
The same principle is used for detection of height. Things below are going to get muffled, things above will be clearer. In reality, feeling sounds with the whole body helps in source localisation, which can't be emulated with headphones.