Maxwell equations and the optical geometry