# Form Factor:Pyramid

## Equations

For pyramid of base edge-length 2R, and height H. The angle of the pyramid walls is $\alpha$. If $H < R/ \tan\alpha$ then the pyramid is truncated (flat top).

• Volume $V_{pyr} = \frac{4}{3} \tan (\alpha) \left[ R^3 - \left( R - \frac{H}{ \tan (\alpha)} \right)^3 \right]$
• Projected (xy) surface area $Sp_{pyr} = 4R^2$

### Form Factor Amplitude $F_{pyr}(\mathbf{q}) = \frac{H}{q_x q_y} \left( \begin{array}{l} \cos\left[ (q_x-q_y)R \right] K_1 \\ \,\,\,\, + \sin\left[ (q_x-q_y)R \right] K_2 \\ \,\,\,\, - \cos\left[ (q_x+q_y)R \right] K_3 \\ \,\,\,\, - \sin\left[ (q_x+q_y)R \right] K_4 \end{array} \right)$
where \begin{alignat}{2} K_1 & = \,\, +\text{sinc}(q_1 H) e^{i q_1 H} + \,\, \text{sinc}(q_2 H)e^{-iq_2 H} \\ K_2 & = -i\text{sinc}(q_1 H) e^{i q_1 H} + i\text{sinc}(q_2 H)e^{-iq_2 H} \\ K_3 & = \,\, +\text{sinc}(q_3 H) e^{i q_3 H} + \,\, \text{sinc}(q_4 H)e^{-iq_4 H} \\ K_4 & = -i\text{sinc}(q_3 H) e^{i q_3 H} + i\text{sinc}(q_4 H)e^{-iq_4 H} \end{alignat} \begin{alignat}{2} q_1 = \frac{1}{2}\left[ \frac{q_x - q_y}{\tan\alpha} + q_z \right] & \,\, , \,\,\,\, & q_2 = \frac{1}{2}\left[ \frac{q_x - q_y}{\tan\alpha} - q_z \right] \\ q_3 = \frac{1}{2}\left[ \frac{q_x + q_y}{\tan\alpha} + q_z \right] & \,\, , \,\,\,\, & q_4 = \frac{1}{2}\left[ \frac{q_x + q_y}{\tan\alpha} - q_z \right] \\ \end{alignat}

### Isotropic Form Factor Intensity

This can be computed numerically.

## Derivations

### Form Factor

For a pyramid of base-edge-length 2R, side-angle $\alpha$, truncated at H (along z axis), we note that the in-plane size of the pyramid at height z is: $R_z = R - \frac{ z }{ \tan \alpha }$

Integrating with Cartesian coordinates: \begin{alignat}{2} F_{pyr}(\mathbf{q}) & = \int\limits_V e^{i \mathbf{q} \cdot \mathbf{r} } \mathrm{d}\mathbf{r} \\ & = \int\limits_{z=0}^{H}\int\limits_{y=-R_z}^{+R_z}\int\limits_{x=-R_z}^{+R_z} e^{i (q_x x + q_y y + q_z z) } \mathrm{d}x \mathrm{d}y \mathrm{d}z \\ & = \int\limits_{0}^{H} \left( \int\limits_{-R_z}^{+R_z} e^{i q_x x} \mathrm{d}x \right) \left( \int\limits_{-R_z}^{+R_z} e^{i q_y y} \mathrm{d}y \right) e^{i q_z z} \mathrm{d}z \end{alignat}

A recurring integral is (c.f. cube form factor): \begin{alignat}{2} f_{x}(q_x) & = \int_{-R_z}^{R_z} e^{i q_x x} \mathrm{d}x \\ & = \int_{-R_z}^{R_z} \left[\cos(q_x x) + i \sin(q_x x)\right] \mathrm{d}x \\ & = -\frac{2}{q_x}\sin(q_x R_z) \\ & = -2 R_z\mathrm{sinc}(q_x R_z) \\ \end{alignat}

Which gives: \begin{alignat}{2} F_{pyr}(\mathbf{q}) & = \int\limits_{0}^{H} \left( -2 R_z\mathrm{sinc}(q_x R_z) \right) \left( -2 R_z\mathrm{sinc}(q_y R_z) \right) e^{i q_z z} \mathrm{d}z \\ & = 4 \int\limits_{0}^{H} R_z^2 \mathrm{sinc}(q_x R_z) \mathrm{sinc}(q_y R_z) e^{i q_z z} \mathrm{d}z \end{alignat}

This can be simplified automated solving. For a regular pyramid, we obtain: \begin{alignat}{2} F_{pyr}(\mathbf{q}) & = \frac{ 4 \sqrt{2} }{q_x q_y} \frac{ \left( \begin{array}{l} -q_y \left(-q_x^2+q_y^2-2 q_z^2\right) \cos(q_y R) \sin(q_x R) \\ \,\,\,\, -q_x \cos(q_x R) \left(2 i \sqrt{2} q_y q_z \cos(q_y R) +\left(q_x^2-q_y^2-2 q_z^2\right) \sin(q_y R)\right) \\ \,\,\,\, +i \sqrt{2} q_z \left(2 e^{i \sqrt{2} q_z R} q_x q_y-\left(q_x^2+q_y^2-2 q_z^2\right) \sin(q_x R) \sin(q_y R)\right) \end{array} \right) } { q_x^4 + (q_y^2 - 2 q_z^2)^2 - 2 q_x^2 (q_y^2 + 2 q_z^2) } \end{alignat}

### Form Factor near q=0

#### qy

When $q_y=0$: \begin{alignat}{2} q_1 & = q_3 \\ q_2 & = q_4 \\ K_1 & = K_3 \\ K_2 & = K_4 \\ \end{alignat}

So: \begin{alignat}{2} F_{pyr}(\mathbf{q}) & = \frac{H}{q_x q_y} \left( \begin{array}{l} \cos\left[ (q_x-q_y)R \right] K_1 \\ \,\,\,\, + \sin\left[ (q_x-q_y)R \right] K_2 \\ \,\,\,\, - \cos\left[ (q_x+q_y)R \right] K_3 \\ \,\,\,\, - \sin\left[ (q_x+q_y)R \right] K_4 \end{array}\right) \\ & = \frac{H}{q_x 0} \left( \begin{array}{l} \cos\left[ q_x R \right] K_1 \\ \,\,\,\, + \sin\left[ q_x R \right] K_2 \\ \,\,\,\, - \cos\left[ q_x R \right] K_1 \\ \,\,\,\, - \sin\left[ q_x R \right] K_2 \end{array}\right) \\ & = \frac{H}{q_x } \frac{0}{0} \\ \end{alignat}

#### qx

When $q_x=0$: \begin{alignat}{2} q_1 & = - q_4 \\ q_2 & = - q_3 \\ K_1 & = \,\, +\text{sinc}(+q_1 H) e^{+i q_1 H} + \,\, \text{sinc}(+q_2 H)e^{-iq_2 H} \\ K_2 & = -i\text{sinc}(+q_1 H) e^{+i q_1 H} + i\text{sinc}(+q_2 H)e^{-iq_2 H} \\ K_3 & = \,\, +\text{sinc}(-q_2 H) e^{-i q_2 H} + \,\, \text{sinc}(-q_1 H)e^{+iq_1 H} \\ K_4 & = -i\text{sinc}(+q_2 H) e^{-i q_2 H} + i\text{sinc}(-q_1 H)e^{+iq_1 H} \end{alignat}

Since sinc is an even function: \begin{alignat}{2} K_1 & = \,\, +\text{sinc}(q_1 H) e^{+i q_1 H} + \,\, \text{sinc}(q_2 H)e^{-iq_2 H} = K_3 \\ K_2 & = -i\text{sinc}(q_1 H) e^{+i q_1 H} + i\text{sinc}(q_2 H)e^{-iq_2 H} = K_4 \\ K_3 & = \,\, +\text{sinc}(q_2 H) e^{-i q_2 H} + \,\, \text{sinc}(q_1 H)e^{+iq_1 H} = K_1 \\ K_4 & = -i\text{sinc}(q_2 H) e^{-i q_2 H} + i\text{sinc}(q_1 H)e^{+iq_1 H} = K_2 \end{alignat}

And: \begin{alignat}{2} F_{pyr}(\mathbf{q}) & = \frac{H}{0 q_y} \left( \begin{array}{l} \cos\left[ -q_yR \right] K_1 \\ \,\,\,\, + \sin\left[ -q_yR \right] K_2 \\ \,\,\,\, - \cos\left[ +q_yR \right] K_1 \\ \,\,\,\, - \sin\left[ +q_yR \right] K_2 \end{array}\right) \\ & = \frac{H}{0 q_y} \left( \begin{array}{l} \cos\left[ +q_yR \right] K_1 \\ \,\,\,\, - \sin\left[ +q_yR \right] K_2 \\ \,\,\,\, - \cos\left[ +q_yR \right] K_1 \\ \,\,\,\, - \sin\left[ +q_yR \right] K_2 \end{array}\right) \\ & = \frac{-2 H}{0 q_y} \sin\left( q_yR \right) \left[ -i \text{sinc}(q_1 H) e^{+i q_1 H} + i\text{sinc}(q_2 H)e^{-iq_2 H} \right] \\ & = \frac{2 i H \sin( q_y R )}{0 q_y} \left[ \text{sinc}(q_1 H) \left( \cos(+i q_1 H) - i \sin(+i q_1 H) \right) - \text{sinc}(q_2 H) \left( \cos(-i q_2 H) - i \sin(-i q_2 H) \right) \right] \\ \end{alignat}

#### qz

When $q_z=0$: \begin{alignat}{2} q_1 & = q_2 \\ q_3 & = q_4 \\ \end{alignat}

So: \begin{alignat}{2} K_1 & = \,\, +\text{sinc}(q_1 H) e^{i q_1 H} + \,\, \text{sinc}(q_1 H)e^{-iq_1 H} \\ K_2 & = -i\text{sinc}(q_1 H) e^{i q_1 H} + i\text{sinc}(q_1 H)e^{-iq_1 H} \\ K_3 & = \,\, +\text{sinc}(q_3 H) e^{i q_3 H} + \,\, \text{sinc}(q_3 H)e^{-iq_3 H} \\ K_4 & = -i\text{sinc}(q_3 H) e^{i q_3 H} + i\text{sinc}(q_3 H)e^{-iq_3 H} \end{alignat}

#### q

When $q=0$: \begin{alignat}{2} q_1 & = q_2 = q_3 = q_4 = 0\\ \end{alignat}

So: \begin{alignat}{3} K_1 & = +1+1& = 2 \\ K_2 & = -i + i & = 0 \\ K_3 & = +1 + 1 & = 2 \\ K_4 & = -i + i & = 0 \end{alignat}

And: $F_{pyr}(\mathbf{q}) = \frac{H}{0 \times 0} \left( \begin{array}{l} \cos\left[ (0)R \right] 2 \\ \,\,\,\, + \sin\left[ (0)R \right] 0 \\ \,\,\,\, - \cos\left[ (0)R \right] 2 \\ \,\,\,\, - \sin\left[ (0)R \right] 0 \end{array} \right)$

#### qx and qy

When $q_x=q_y=0$: \begin{alignat}{3} q_1 & = q_3 & = +\frac{q_z}{2} \\ q_2 & = q_4 & = -\frac{q_z}{2} \\ \end{alignat} \begin{alignat}{2} K_1 & = \,\, +\text{sinc}(+q_z H/2) e^{+i q_z H/2} + \,\, \text{sinc}(-q_z H/2)e^{+iq_z H/2} \\ K_2 & = -i\text{sinc}(+q_z H/2) e^{+i q_z H/2} + i\text{sinc}(-q_z H/2)e^{+iq_z H/2} \\ K_3 & = \,\, +\text{sinc}(+q_z H/2) e^{+i q_z H/2} + \,\, \text{sinc}(-q_z H/2)e^{+iq_z H/2} = K_1 \\ K_4 & = -i\text{sinc}(+q_z H/2) e^{+i q_z H/2} + i\text{sinc}(-q_z H/2)e^{+iq_z H/2} = K_2 \end{alignat}

So: \begin{alignat}{2} F_{pyr}(\mathbf{q}) & = \frac{H}{q_x q_y} \left( \begin{array}{l} \cos\left[ (q_x-q_y)R \right] K_1 \\ \,\,\,\, + \sin\left[ (q_x-q_y)R \right] K_2 \\ \,\,\,\, - \cos\left[ (q_x+q_y)R \right] K_1 \\ \,\,\,\, - \sin\left[ (q_x+q_y)R \right] K_2 \end{array} \right) \\ \end{alignat}

To analyze the behavior in the limit of small $q_x$ and $q_y$, we consider the limit of $q\to0$ where $q_x=q_y=q$. We replace the trigonometric functions by their expansions near zero (keeping only the first two terms): \begin{alignat}{2} \lim_{q\to0} F_{pyr}(\mathbf{q}) & = \frac{H}{q q} \left( \begin{array}{l} \cos\left[ (q-q)R \right] K_1 \\ \,\,\,\, + \sin\left[ (q-q)R \right] K_2 \\ \,\,\,\, - \cos\left[ (q+q)R \right] K_1 \\ \,\,\,\, - \sin\left[ (q+q)R \right] K_2 \end{array} \right) \\ & = \frac{H}{q^2} \left( \begin{array}{l} \left[ 1 - \frac{ ((q-q)R)^2 }{2!} + \cdots \right] K_1 \\ \,\,\,\, + \left[ (q-q)R - \frac{((q-q)R)^3}{3!} + \cdots \right] K_2 \\ \,\,\,\, - \left[ 1 - \frac{ ((q+q)R)^2}{2!} + \cdots \right] K_1 \\ \,\,\,\, - \left[ (q+q)R - \frac{((q-q)R)^3}{3!} + \cdots \right] K_2 \end{array} \right) \\ & = \frac{H}{q^2} \left( \begin{array}{l} \left[ 1 - \frac{ ((q-q)R)^2 }{2!} - 1 + \frac{ ((q+q)R)^2}{2!} \right] K_1 \\ \,\,\,\, + \left[ (q-q)R - \frac{((q-q)R)^3}{3!} - (q+q)R + \frac{((q-q)R)^3}{3!}\right] K_2 \\ \end{array} \right) \\ & = \frac{H}{q^2} \left( \begin{array}{l} \left[ \frac{ ((2q)R)^2}{2!} - \frac{ ((q-q)R)^2 }{2!} \right] K_1 \\ \,\,\,\, + \left[ (q-q)R - (2q)R \right] K_2 \\ \end{array} \right) \\ & = \frac{ (2qR)^2}{2!}\frac{H K_1}{q^2} - \frac{ ((q-q)R)^2 }{2!}\frac{H K_1}{q^2} + (q-q)R \frac{H K_2}{q^2} - 2qR \frac{H K_2}{q^2} \\ & = \frac{ 4R^2 H K_1}{2} - \frac{ R^2 H K_1}{2}\frac{(q-q)^2}{q^2} + R H K_2\frac{(q-q)}{q^2} - \frac{2 R H K_2}{q} \\ & = 2R^2 H K_1 \end{alignat}

Note that since $\mathrm{sinc}$ is symmetric $K_2=K_4=0$. When $q_x$ and $q_y$ are small (but not zero and not necessarily equal), many of the above arguments still apply. It remains that $K_2 \approx K_4 \approx 0$, and: \begin{alignat}{2} \lim_{(q_x,q_y)\to0} F_{pyr}(\mathbf{q}) & = \frac{H K_1}{q_x q_y} \left( \cos\left[ (q_x-q_y)R \right] - \cos\left[ (q_x+q_y)R \right] \right) \\ & = \frac{H K_1}{q_x q_y} \left( \left[ 1 - \frac{ ((q_x-q_y)R)^2}{2!} + \cdots \right] - \left[ 1 - \frac{((q_x+q_y)R)^2}{2!} + \cdots \right] \right) \\ & = \frac{H K_1}{q_x q_y} \left( \frac{(q_x+q_y)^2 R^2}{2!} - \frac{(q_x-q_y)^2 R^2}{2!} \right) \\ & = \frac{H R^2 K_1}{2 q_x q_y} \left( (q_x+q_y)^2 - (q_x-q_y)^2 \right) \\ \end{alignat}

### Isotropic Form Factor Intensity

To average over all possible orientations, we note: $\mathbf{q}=(q_x,q_y,q_z)=(-q\sin\theta\cos\phi,q\sin\theta\sin\phi,q\cos\theta)$

and use: \begin{alignat}{2} P_{pyr}(q) & = \int\limits_{S} | F_{pyr}(\mathbf{q}) |^2 \mathrm{d}\mathbf{s} \\ & = \int_{\phi=0}^{2\pi}\int_{\theta=0}^{\pi} \left| \frac{H}{q_x q_y} \left( \begin{array}{l} \cos\left[ (q_x-q_y)R \right] K_1 \\ \,\,\,\, + \sin\left[ (q_x-q_y)R \right] K_2 \\ \,\,\,\, - \cos\left[ (q_x+q_y)R \right] K_3 \\ \,\,\,\, - \sin\left[ (q_x+q_y)R \right] K_4 \end{array} \right) \right|^2 \sin\theta\mathrm{d}\theta\mathrm{d}\phi \\ & = \frac{H^2}{q^2} \int_{0}^{2\pi}\int_{0}^{\pi} \frac{1}{\sin^4\theta \sin^2\phi\cos^2\phi} \left| \left( \begin{array}{l} \cos\left[ (q_x-q_y)R \right] K_1 \\ \,\,\,\, + \sin\left[ (q_x-q_y)R \right] K_2 \\ \,\,\,\, - \cos\left[ (q_x+q_y)R \right] K_3 \\ \,\,\,\, - \sin\left[ (q_x+q_y)R \right] K_4 \end{array} \right) \right|^2 \sin\theta\mathrm{d}\theta\mathrm{d}\phi \\ \end{alignat}

## Regular Pyramid

A regular pyramid (half of an octahedron) has faces that are equilateral triangles (each vertex is 60°). The 'corner-to-edge' distance along each triangular face is then: $d_{face,c-e} = R \tan(60^{\circ}) = \sqrt{3} R$

This makes the height: \begin{alignat}{2} (d_{face,c-e})^2 & = (H)^2 + (R)^2 \\ H^2 & = (d_{face,c-e})^2 - (R)^2\\ H & = \sqrt{ (\sqrt{3} R)^2 - (R)^2 }\\ & = \sqrt{ 3 R^2 - R^2 }\\ & = \sqrt{ 2 } R \\ \end{alignat}

So that the pyramid face angle, $\alpha$ is: \begin{alignat}{2} \tan(\alpha) & = \frac{ H }{ R } \\ \alpha & = \arctan \left( \frac{\sqrt{ 2 } R}{R} \right) \\ & = \arctan( \sqrt{2} ) \\ & \approx 0.9553 \\ & \approx 54.75^{\circ} \end{alignat}

The square base of the pyramid has edges of length 2R. The distance from the center of the square to any corner is H, such that: \begin{alignat}{2} \cos(45^{\circ}) & = \frac{R}{H} \\ H & = \frac{R}{ 1/\sqrt{2} } \\ & = \sqrt{2} R \end{alignat}

### Surface Area

For a non-truncated, regular pyramid, each face is an equilateral triangle (each vertex is 60°). So each face: \begin{alignat}{2} S_{face} & = 2 \times \left( \frac{ R R \tan(60^{\circ}) }{2} \right) \\ & = R^2 \sqrt{3} \end{alignat}

The base is simply: \begin{alignat}{2} S_{base} & = 2 R \times 2 R \\ & = 4 R^2 \end{alignat}

Total: \begin{alignat}{2} S_{pyr} & = 4 \times R^2 \sqrt{3} + 4 R^2 \\ & = 4(1 + \sqrt{3}) R^2 \end{alignat}

### Volume

For a regular pyramid, the height $H=\sqrt{2}R$ and $\tan(\alpha)=H/R = \sqrt{2}$: \begin{alignat}{2} V_{pyr} & = \frac{4}{3} \tan (\alpha) \left[ R^3 - \left( R - \frac{H}{ \tan (\alpha)} \right)^3 \right] \\ & = \frac{4}{3} \sqrt{2} \left[ R^3 - \left( R - \frac{ \sqrt{2} R }{ \sqrt{2}} \right)^3 \right] \\ & = \frac{4\sqrt{2}}{3} R^3 \\ \end{alignat}