A truncated pyramid (frustum) with quadratic base.
Pyramid4(L, H, alpha)
Parameters:
The angle must satisfy
$$0 < \alpha < 180^\circ.$$
For $\alpha<90^\circ$, the upper edge must not become negative, so the height must satisfy
$$H \le \dfrac{\tan\alpha}{2}L.$$
For $\alpha\ge90^\circ$, there is no additional height constraint.
As for any other Form factor.
Class Pyramid4 inherits from the interface class Formfactor.
Form factor computation is based on the generic form factor of a polyhedron provided by libformfactor .
Volume has been validated against $$ V=\dfrac{L^3\tan\alpha}{6}\Big[1-\Big(1-\dfrac{2H}{L\tan\alpha}\Big)^3\Big]. $$
More general:
Scattering by uncorrelated, oriented pyramids for horizontal incidence. Rotation around $z$ axis:
Generated by Examples/sas/sas-ff.py
(particle_geometry=Pyramid4).
Was named “Pyramid” up to BornAgain 1.19.
Corresponds to “Pyramid” form factor of IsGISAXS Lazzari, IsGISAXS manual v2.6 (2006), Eq. 2.25 and “Square basis pyramid” Renaud et al, Surf Sci Rep 64, 255 (2009), Eq. 215, except for different parametrization $L = 2R_{IsGISXAXS}$ and a corrected sign.
Reimplemented in BornAgain 1.6 using the generic form factor of a polyhedron Wuttke, J Appl Cryst 54, 580 (2021), to achieve numerical stability near the removable singularity at $q \to 0$.