General relativity and topological string duality through Penrose–Ward transform