Explanation/Update to 'Computer generated holograms from three dimensional meshes using an analytic light transport model'
1. Update October 1, 2014
I've completely rewritten this post because it was extremely confusing. It was attempt to explain a section in the research article Computer generated holograms from three-dimensional meshes using an analytic light transport model authored by myself and three colleagues (I'll refer to it as the paper below). I am still getting the occasional email asking me to explain points in that section and wanted to write it up. The blog post was kind of confusing in itself however, and may even have called some things errors that were not. I hope I set things straight this time around. The section in the paper that caused the original confusion and blog post is 3.B: The Fourier Spectra of a General Triangle, leading up to equation 19. This is based on a result taken from 'Affine theorem for two-dimensional fourier transform' by Bracewell et al. A correct expression for the affine relation between two Fourier spectra, but the problem is that I went out of my way to squeeze an intermediate result into it making the whole thing quite complicated. None of that is necessary. Here is how to derive a much cleaner version of Equation 19:
2. New version of Eqn. 19
2.1. Derive general relation
We'll start by deriving an expression equivalent to that of Bracewell et al, but using vector algebra, and the (perhaps unconventional?) notation \(f\left(x_0, x_1, x_2, . . . x_n\right) = f\left(\mathbf{x}\right)\).
Given two (integrable) functions \(f , g\) on \( \mathbb{R}^n \rightarrow \mathbb{C}\) related by an Affine transform such that \( g\left(\mathbf{Ax} + \mathbf{a}\right) = f\left(\mathbf{x}\right)\). How do we write the Fourier spectrum of \( g\) (let's call it\( G\)) in terms of the spectrum of \( f\) (called \( F\))?
First, write out the Fourier integral \( G\):
\( G\left(\mathbf{u}\right) = \int_{\mathbb{R}^n} g\left(\mathbf{s}\right) \exp\left( -2 \pi {i} \mathbf{u}^t \mathbf{s} \right) d \mathbf{s}\)
Then introduce the affine coordinate transform \( \mathbf{s} = \mathbf{Ax} + \mathbf{a}\), and scale the integral by the Jacobian determinant:
\( G\left(\mathbf{u}\right) = \int_{\mathbb{R}^n} g\left(\mathbf{Ax} + \mathbf{a}\right) \exp\left( -2 \pi {i} \mathbf{u}^t \left(\mathbf{Ax} + \mathbf{a}\right) \right) \|\det\left(A\right)\| d\mathbf{x}\).
Now, \( g\) can be substituted for \( f\), the determinant and part of the exponential not dependent on \( \mathbf{x}\) can be taken out of the integral:
\( G\left(\mathbf{u}\right) = \|\det\left(A\right)\| \exp \left( -2 \pi {i} \mathbf{u}^t \mathbf{a}\right) \int_{\mathbb{R}^n}\exp \left( -2 \pi {i} \mathbf{u}^t \mathbf{A} \mathbf{x} \right)d \mathbf{x}\)
What we have left is a transformed version of the Fourier spectrum \( F\), scaled and multiplied by a phase factor:
\( G\left(\mathbf{u}\right) = \|\det\left(A\right)\| \exp \left( -2 \pi {i}\mathbf{u}^t\mathbf{a}\right) F\left(\mathbf{A}^t \mathbf{u}\right)\).
2.2. The two triangles and their affine transform
This will sidestep Equations 15 and 16 in the paper which is actually the inverse of what we'll derive here. In the paper we have two 'triangle functions' in the plane:
\( f_{\Delta}\) with vertices \( \left(0,0\right), \left(1,0\right), \left(1,1\right)\) (The triangle \( \Delta\));and
\( f_{\Gamma}\) with vertices \( \left(s_1, t_1\right), \left(s_2, t_2\right), \left(s_3, t_3\right)\) (The triangle \( \Gamma\)).
Moreover, earlier in the paper we derived an expression for the Fourier transform of \( f_{\Delta}\), denoted \( F_{\Delta}\) (it is a long expression and not relevant here so I'll just use a symbol for it), and now we would like to know if we can express the Fourier transform of \( f_{\Gamma}\), denoted \( F_{\Gamma}\) as a function of this.
Well, from our previous calculations we know it is so. We just need to set up the affine transform (written out using its matrix elements here as we will use them shortly) that mapps triangle \( \Delta\) to triangle \(\Gamma\):
\( \begin{bmatrix} s \\ t \end{bmatrix} = \begin{bmatrix} a_{11} & a_{12}\\ a_{21} & a_{22} \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} + \begin{bmatrix} a_{13} \\ a_{23} \end{bmatrix} \),
which means that \(f_{\Gamma}\left(s, t\right) = f_{\Delta}\left(x, y\right)\).
Finding the elements \( a_{ij}\) is straight forward if we define the following relation between the triangle vertices:
\( \left(0, 0\right) \mapsto \left(s_1, t_1\right), \left(1, 0\right) \mapsto \left(s_2, t_2\right), \left(1, 1\right) \mapsto \left(s_3, t_3\right) \)
Forming the system of equations:
\(\begin{bmatrix} s_1 \\ t_1 \end{bmatrix} = \begin{bmatrix} a_{11} & a_{12}\\ a_{21} & a_{22} \end{bmatrix} \begin{bmatrix} 0 \\ 0 \end{bmatrix} + \begin{bmatrix} a_{13} \\ a_{23} \end{bmatrix} \)
\( \begin{bmatrix} s_2 \\ t_2 \end{bmatrix} = \begin{bmatrix} a_{11} & a_{12}\\ a_{21} & a_{22} \end{bmatrix} \begin{bmatrix} 1 \\ 0 \end{bmatrix} + \begin{bmatrix} a_{13} \\ a_{23} \end{bmatrix} \)
\( \begin{bmatrix} s_3 \\ t_3 \end{bmatrix} = \begin{bmatrix} a_{11} & a_{12}\\ a_{21} & a_{22} \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} + \begin{bmatrix} a_{13} \\ a_{23} \end{bmatrix} \)
Which solved for \( a_{ij}\) gives the following transform:
\( \begin{bmatrix} s \\ t \end{bmatrix} = \begin{bmatrix} s_2 - s_1 & s_3 - s_2\\ t_2 - t_1 & t_3 - t_2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} + \begin{bmatrix} s_1 \\ t_1 \end{bmatrix} \).
2.3. Putting things together
What remains is to write out a new expression for Equation 19 by inserting the matrix elements into the equation relating Fourier spectra derived above.
To make things explicit, \( G = F_{\Gamma}, F = F_{\Delta}, \mathbf{u} = \begin{bmatrix} u \\ v\end{bmatrix}\), which means that
\( F_{\Gamma}\left(u,v\right) = J \exp \left[ -2 \pi {i}\left( a_{13} u + a_{23} v \right) \right] F_{\Delta}\left( a_{11}u+a_{21}v,a_{12}u+a_{22}v\right),\)
where \(J = \| a_{11} a_{22} - a_{12} a_{21} \|\), and the \( a_{ij}\) is taken from the matrix at the end of the previous section and not from the paper.
That is it. A cleaner version of Equation 19 in the paper. I hope it helps someone.
.L
P.S. If you go ahead with Equation 19 from the paper anyway. Note what I think is a typo there: the first argument to \( F_{\Delta}\) should be \( \frac{(a_{22}u - a_{21}v)}{J}\).