St. Basil's cathedral, Moscow steeple shape Onion-shaped dome cathedral architecture seen here appears to include in its lower part a geometry of positive, and in upper (steeple) part negative Gauss curvature.
The corresponding elliptic and hyperbolic geodesics transition at an inflection cone radius.

They typically have continuous contrasting curved lines as seen on the middle yellow tessellated surface. It has been modeled approximately now like:

What intrigues me is the artful way its architect produced a variety of cupolas on the same onion meridian ( upto scale ) by changing :

*

*Spacing between the (two combined) geodesics, 2) Flatness /Roughness appearance by choosing tessellation heights  , 3) even Blending the tessatations into a  smooth continuous spiral "garlic" tubular form shown sectioned at right, 3) Coloring  schemes... among others.

How might have been the lines drawn and built? Was differential geometry developed enough during Ivan's time in architecture for computations? Are there such shapes built as domes/steeples elsewhere in the world?
 A: Short answer: differential geometry did not exist at the times of Ivan IV, and was not needed for the job. The reason is two-fold:

*

*The shape is not as regular as it might appear. Below is the panoramic view of Saint Basil's Cathedral. I drew the contours of the domes in the front, and below you can see them superimposed. As you can see, they are similar (and appear to come in pairs), but not quite the same, and not only in size, but in shape as well.




*The domes were usually made of wood and were subject to remaking after the fires, which at the time happened quite often. In the reconstruction process no masonry was required, so most likely the local carpenters were given the job. It also seems that the main engineering problem was setting the cross, which tended to become bigger and heavier with time (the tradition in Russia drifted from that of Byzantium, and also lead to the use of chains for holding it as you can see in the pictures). Below is the picture of the insides of an onion dome (this one is from Munich). So it appears that only the general appearance was set by the architector, and not the precise shape (one would also not expect the architector to be around at the time of dome remaking).


Onion domes were widespread in Russia at least as early as in the XIII century, as indicated by their appearance in the drawings of the time. Research (the paper by S. Zagraevsky in Russian) shows that they were very inlikely inspired by any foreign building and should have depicted actual churches in Russia. While for the end of the XVI century I can imagine a discussion whether there was something similar to differential geometry already, there certainly was none in the XIII century.
As for the use outside Russia, onion domes start appearing in the XVI century. The earliest example in Europe appear to be Convent of the Franciscan Sisters of Maria Stern, picture below.

Similar dome shapes also appear at the time in Mughal architecture, though they look more like a sphere with a cone on top of it (because they are built of stone, apparently).
Other examples and an overview can be found in Wikipedia, although the sections on the history should be taken with a grain of salt.
