Ulugh Beg was one of the world's greatest astronomical minds, an enlightened leader who turned medieval Samarkand into a great center of science 150 years before Galileo invented the telescope.