For quite some years during high school and some of my early bachelor years, I used to work on holography, sometimes doing it from a more scientifically perspective (interferometry, …) and sometimes doing it more for the fun of it (just as people do photography, but in this case you can get a nice 3D image out of it 🙂 ).
In 2006 while I was a bachelor student, I decided to do something with computer generated holograms (CGH). Here’s some basic stuff based on T. Walker, Holography without photography, A. J. Phys 67(9), Sep. 1999.
The diffraction patterns were generated using this code (Matlab) using a slow DFT (nowadays I would completely change this, but unfortunately I have no time):
% Created by Alexandre Lopes
% Universidade de Aveiro
% Based on Walker, Holography without photography
hi = clock
R = 75;
N = 300;
thr = 0.6;
f = 0.15; %m
lambda = 633*10^(-9); % m
tobj = 0.0004; % object size (m)
tholo = 0.0254; % hologram size (m)
o = tobj/R;
h = tholo/N;
% A - matrix with initial image:
% 1 for white
% 0 for black
% A,B -> RxR matrix
% Holo -> NxN matrix
Holo = zeros(N);
randphi = rand*2*pi;
Holo(X+1,Y+1)= Holo(X+1,Y+1)+ A(row+1,col+1)*cos(2*pi ...
maxholo = max(max(Holo));
minholo = min(min(Holo));
for J =1:N;
if ((Holo(I,J)-minholo)/(maxholo-minholo))>thr %Threshold
B(I,J) = 1; % White pixel
B(I,J) = 0; % Black pixel
hfinal = clock
and printed on transparencies using a laser printer.
The setup consisted of a HeNe laser, plus a spatial filter (which is not really necessary) and a plano-convex lens (see this).
That we can reconstruct the original image, is explained by Fourier optics and the Fraunhofer diffraction produced by the transparency (see this, I won’t go into details right now, maybe I will do this if I ever find the time).
Note that as the image is projected on a wall, there’s no 3D image (and it was anyway not encoded in the diffraction pattern).