First, know that there are two versions of The Virgin of the Rocks, one hanging in the Louvre and one in the National Gallery of London. It's thought that da Vinci first created the Louvre version by himself for a commission, but then sold it privately. Sometime later, he (and possibly his assistants) created a second copy, based on the first, in order to fulfill the original commission. That's the version hanging in the National Gallery.
(By the way, to see why da Vinci might have set this typical Christian scene in such an unorthodox location, read this BBC essay. It provides further confirmation of how far ahead of his time he was, scientifically speaking.)
Using infrared techniques, National Gallery researchers discovered the draft of a different drawing beneath the visible paint in 2005. To see if there was more to it, another team re-scanned the painting using cutting-edge macro x-ray fluorescence techniques more recently. Thanks to the presence of zinc in the original drawing material, it revealed much more detail from the original composition.
The first draft was significantly different from the final painting, with the figures positioned higher and looking in different directions. The angel at right is looking down on the baby Christ and holding him more tightly, while the Virgin is looking toward the angel and Christ, rather than at the John the Baptist baby figure at left.
It's not clear why da Vinci abandoned the original, arguably more dynamic composition. In any case, the under-drawing shows typical da Vinci "elaborations and adjustments" used when he transitioned from drawing to painting, according to curators. "For instance, the angle of the Infant Christ's head was changed so that he was seen in profile, while some parts of the angel's curly hair have been removed," the gallery wrote in a press release.
The research will form the basis of a new National Gallery exhibition entitled Leonardo: Experience a Masterpiece kicking off on November 9th, 2019. Visitors will see how the painting might have looked in the original chapel setting, while exploring the new drawings and seeing how experts uncovered them. We might never know what the great man was thinking, but we will get to enjoy what is essentially a completely new Leonardo da Vinci work.