The story
First attested in Modern English in 1688, although the phrase was also used in Middle English by Geoffrey Chaucer (c. 1343–1400) in his Treatise on the Astrolabe; Latin: umbra (“shadow”) + rēcta (feminine nominative singular of rēctus, “straight”) = “straight shadow”; compare umbra versa.
Etymology from Wiktionary, CC BY-SA 4.0.