# Create a Hologram with Matlab?

1. Feb 2, 2010

### jordanleeburg

Create a Hologram with Matlab!?!?!

Hi,

I have been given a task to mathematically create a hologram of an object so that I can try various reconstruction procedures to obtain the objects field. For simplicity I am assuming the object is a 1*1 pixel in a 256*256 matrix (x,y plane) and it is assigned the value exp(-i*thi(x)) so that it is a 'phase' object and only alters the phase of the wavefront and not the amplitude (I am modelling this case as I am using a digital holographic microscope to measure refractive index distributions of biological cells).

I am then multiplying the 'object' with a plane wave and then propagate the wave a distance z along the z axis by using the Angular spectrum method from Fourier Optics. This is not necessarily needed for a plane wave but as ultimately I would like to model Gaussian waves (whiich have curved phase surfaces so by taking the F.T we end up with a superposition of plane waves which we can propagate easily) I thought this would be a good method. I take the Fourier Transform of the initial field on z=0 and then multiply the spectrum by the transfer function (F.T of impulse response) for steps of dz and then do an iterative loop over each step dz until the wave has propagated to distance z.

So I end up with a field at Z which either resembles Fresnel or Fraunhoffer diffraction patterns depending on my input. I now need to combine this 'object' field with a reference beam so that constructive/deconstructive interference occurs and I end up with a hologram of the object.

Firstly I am not even sure if the above propagtion method is correct for calculating a hologram? I also am struggling to grasp how I can 'interfere' with a reference beam. In my model the initial plane wave is modelled as Planewave=1 as on the z=0 plane there will be a constant phase and amplitude. So the hologram is given by

Hologram=Mod(O+R)=Mod(O +1) where O=the object field which has both amplitude and phase.

I cant see how simply adding 1 to every component of my object matrix could cause 'interference' to occur? Have I majorly misunderstood something!?!?

Please can someone help me as I have spent so long on this and am getting no where. Ideally, I would like to interfere the object wave with a plane wave which is travelling at an angle theta to the z axis. This results in an off-axis hologram. Could I do this with my above method or would I have to try a different way?

Thanks!

2. Feb 18, 2010

### las3rjock

Re: Create a Hologram with Matlab!?!?!

It is not the superposition of the fields (the addition process $$O+R$$) that results in interference, but the determination of the intensity of the superimposed fields (finding the modulus squared of the total field $$\lvert O+R \rvert^2$$). Let

$$O(x,y) = o(x,y) \exp [i \phi(x,y)]$$

where $$o(x,y)$$ and $$\phi(x,y)$$ are real-valued functions describing the amplitude and phase of the object field and $$i = \sqrt{-1}$$. Similarly, let

$$R(x,y) = r(x,y) \exp [i \psi(x,y)]$$

where $$r(x,y)$$ and $$\psi(x,y)$$ are the amplitude and phase of the reference field. Then the intensity of the superposition of the object and reference fields is given by

$$I(x,y) = \lvert O(x,y) + R(x,y) \rvert^2 = (O + R)(O + R)^*$$

where the complex conjugate $$z^*$$ of a complex number $$z = a + b i = r \exp (i \psi)$$ is given by $$z^* = a - b i = r \exp (-i \psi)$$. Then we have

$$I(x,y) = O O^* + O R^* + R O^* + R R^* = \lvert O \rvert^2 + \lvert R \rvert^2 + o r \exp [i (\phi - \psi)] + o r \exp[i (\psi - \phi)] = \lvert O \rvert^2 + \lvert R \rvert^2 + 2 o r \cos (\psi - \phi)$$

Notice that the phase difference $$\psi - \phi$$ between the reference and object fields has been encoded as an intensity distribution $$2 o(x,y) r(x,y) \cos [\psi(x,y) - \phi(x,y)]$$. This is the interference of the object and reference fields.

Now suppose the intensity distribution is recorded on photographic film. Then the amplitude transmittance of the developed film is

$$t_A (x,y) = I(x,y) = \lvert O \rvert^2 + \lvert R \rvert^2 + o r \exp [i (\phi - \psi)] + o r \exp[i (\psi - \phi)]$$

I leave it as an exercise for the reader to show that, if the reference wave $$R(x,y)$$ is used to illuminate the developed film, thereby producing a transmitted field $$t_A (x,y) R(x,y)$$, then the transmitted field has a term $$\lvert R \rvert^2 o(x,y) \exp [i \phi(x,y)] = \lvert R \rvert^2 O(x,y)$$, that is, the transmitted field includes a term that reconstructs the amplitude and phase of the object field.