A finite dimensional approach to light rays in General Relativity