According to Steven Levingston
Da Vinci […] had already painted “The Last Supper,” but it was his thinking on science and technology […] that landed him in Borgia’s service as his chief military engineer. Da Vinci contributed his considerable gifts to strengthening the duke’s fortresses (curved walls reduced the impact of cannonballs), drawing maps (with the use of his invention, the hodometer, to measure precise distances) and building ad hoc bridges for the duke’s army to cross rivers.
Ultimately, however, da Vinci became disgusted by Borgia. By the time he escaped the duke’s employ, da Vinci had undergone “a profound psychological change . . . as a result of his terrifying experiences.” He still worked on his own projects — paintings, designs for buildings, canal improvements — but could finish little. He considered publishing his understanding of science and technology but was unable to see the effort through. After his exposure to Borgia, Strathern writes, da Vinci realized that development of his military engineering skills — once a source of pride and ambition — was a “grotesque error.” While he continued to fill his notebooks with diagrams, drawings and speculations, da Vinci also wrote, “I will not publish, nor divulge such things because of the evil nature of men.” In the end, he left a meager legacy: There are no sculptures, no complete buildings, from his architectural drawings and only a handful of paintings, some unfinished.
See also “Do not put your trust in chariots and weapons“.