The topmost picture shows Bhim-ratha (having barrel roof top) and Dharamraja-rath (truncated pyramidial form). The gopuram connection with Bhima ratha in following the barrel roof form( chaitya hall) was budhist generative/ derivative, that did not happen in Indo-Aryan temple examples on account of many factors.
The main shrine gets imprinted from Dharamraja rath example. The motifs of barrel form are repeated all round the main shrine, sitting one over other in tiers. The idea was of having houses of gods (portable wooden temples in early Budhist period) all around the sides of the main shrine.