Recording a hologram by using the second order nonlinearity