It has long been argued that many of the artists drawing on cave walls were not merely trying to draw the external world as accurately as possible. Rather cave art was:
A deliberate mix of rituals inducing altered states for participants, coupled with brain chemistry that elicits certain visual patterns for humanity’s early chroniclers.
The cave painters had rituals that involved taking drugs (undoubtedly plants) that they consumed in a frenzy to get to this creative state. This behavior and the same results were noted by 1960s-era academics studying the effects of peyote, a hallucinogenic cactus found in North America.
Some drawings which illustrate these patterns are:



There seem to be a number of geometric patterns like honeycombs, tunnels and funnels, cobwebs, and spirals which show up repeatedly across different continents. This has fueled speculation that those prehistorics were tripping out on veggies like peyote and magic mushrooms. In his “Stoned Ape” theory, the late Terrence McKenna proposed that consumption of shrooms gave the earliest humans higher energy and group cohesion and helped humanity to evolve the use of language.
A more recent study by Tel Aviv University researchers suggests that another way that Stone Age artists got into an altered state was plain oxygen deprivation. Many sites of cave art, particularly in France and Spain, are at the end of long, narrow passages. If a couple of guys got into one of those rooms, with a blazing torch or two, the oxygen level would soon be significantly depleted:
They found that oxygen concentration depended on the height of the passageways, with the shorter passageways having less oxygen. In most of the simulations, oxygen concentrations dropped from the natural atmosphere level of 21% to 18% after being inside the caves for only about 15 minutes.
Such low levels of oxygen can induce hypoxia in the body, a condition that can cause headache, shortness of breath, confusion and restlessness; but hypoxia also increases the hormone dopamine in the brain, which can sometimes lead to hallucinations and out-of-body experiences, according to the study.
Drawings like the following from the Altimira cave are pretty impressive under those circumstances:
