The Taiwan-born Ang Lee rapidly established himself in the 1990s as one of the world's most versatile film-makers, moving on from the trilogy of movies about Chinese families that made his name to Jane Austen's England (Sense and Sensibility) and Richard Nixon's America (The Ice Storm). If he revisits a place or genre it's to tell a very different story – a martial arts movie in medieval China (Crouching Tiger, Hidden Dragon) is followed by a spy thriller in wartime Shanghai (Lust, Caution), and a western with a US civil war background (Ride With the Devil) is succeeded by a western about a gay relationship in present-day Wyoming (Brokeback Mountain).

He adopts different styles to fit his new subjects, and while there are certain recurrent themes, among them the disruption of families and young people facing moral and physical challenges, there are no obsessive concerns of the sort once considered a necessity for auteurs. He has a fastidious eye for a great image but he also has a concern for language.

His magnificent new film is a version of Yann Martel's Booker prize-winning novel, Life of Pi, adapted by an American writer, David Magee, whose previous credits were films set in England during the first half of the 20th century, Finding Neverland and Miss Pettigrew Lives for a Day. From its opening scene of animals and birds strutting and preening themselves in a sunlit zoo to the final credits of fish and nautical objects shimmering beneath the sea, the movie has a sense of the mysterious, the magical. This effect is compounded by the hallucinatory 3D, and in tone the film suggests Robinson Crusoe rewritten by Laurence Sterne.

The form is a story within a story within a story. An unnamed Canadian author whom we assume to be Yann Martel himself (Rafe Spall) is told by an Indian he meets that there is a man in Montreal called Pi who has a story that will make you believe in God. He's Piscine Molitor Patel (Irrfan Khan), a philosophy teacher, and he tells the curious story of his own extraordinary life, beginning as the son of a zookeeper in Pondicherry, the French enclave in India that wasn't ceded until 1954.

The movie's two central characters both obtained their names by comic accident. The deeply serious Piscine (played by Gautam Belur at five, Ayush Tandon at 12 and Suraj Sharma at 16)was named after an uncle's favourite swimming pool, the Piscine Molitor in Paris, but changed his name to the Greek letter and numinous number Pi after fellow schoolboys made jokes about pissing. He later became fascinated by a Bengal tiger in the zoo caught by the English hunter Richard Parker who called him Thirsty. On delivery to the zoo their names were accidently reversed and the tiger became Richard Parker. Was this fate or chance?

Growing up, the ever curious Pi becomes attracted to religion and the meaning of life, a spiritual journey that the film treats with a respectful wit as the boy rejects his father's rationalism and creates a personal amalgam of Hinduism, Christianity and Islam. His faith is tested as an adolescent when his father is forced to give up the family zoo, where Pi realises he's been as much a captive as the animals themselves. A Japanese freighter becomes a temporary ark on which the Patel family take the animals to be sold in Canada. But it's struck by a storm as dramatic as anything ever put on the screen, and Pi becomes a combination of Noah, Crusoe, Prospero and Job. Alone above the Mariana Trench, the deepest part of the Pacific, he's an orphan captaining a lifeboat with only a zebra, a hyena, a female orang-utan and the gigantic Bengal tiger Richard Parker for company.

This is grand adventure on an epic scale, a survival story that takes up half the movie. It's no Peaceable Kingdom like Edward Hicks's charming early 19th-century painting, where the lion sleeps with the lamb. This is a Darwinian place that Pi must learn to command. Using state-of-the-art 3D and digitally created beasts, Lee and his team of technicians make it utterly real, as they do a mysterious island that briefly provides a dangerously seductive haven. The 227 days at sea are a test of physique, mental adaptation and faith, and Suraj Sharma makes Pi's spiritual journey as convincing as his nautical one.

He confronts thirst and starvation, finds a modus vivendi with the fierce tiger, endures and wonders at a mighty storm, a squadron of flying fish, a humpbacked whale, a school of dolphins, a night illuminated by luminous jellyfish. This brave new world is observed by a young Chilean director of photography, appropriately named Claudio Miranda. The movie does for water and the sea what Lawrence of Arabia did for sand and desert, and one thinks of what Alfred Hitchock, who used 3D so imaginatively in his 1954 film of Dial M For Murder, might have done on his wartime Lifeboat had he been given such technical facilities.

This poetic Life of Pi concludes with a fascinating, deliberately prosaic coda that raises questions about the reality of what we've seen and confronts the teleological issues involved. One thinks of the reporter's remark at the end of The Man Who Shot Liberty Valance: "When the legend becomes fact, print the legend." At another level, Sam Goldwyn's advice to the screenwriter comes to mind: "Give me the story and send the message by Western Union."