| 1 |
+++ |
| 2 |
title = "Pyramid4" |
| 3 |
+++ |
| 4 |
|
| 5 |
### Pyramid4 |
| 6 |
|
| 7 |
A truncated pyramid (frustum) with quadratic base. |
| 8 |
|
| 9 |
<img src="/img/draw/ff/3d/Pyramid4.png" width="30%" > |
| 10 |
<img src="/img/draw/ff/2d/Pyramid4_xy.svg" width="30%"> |
| 11 |
<img src="/img/draw/ff/2d/Pyramid4_xz.svg" width="30%"> |
| 12 |
|
| 13 |
#### Constructor |
| 14 |
|
| 15 |
```python |
| 16 |
Pyramid4(L, H, alpha) |
| 17 |
``` |
| 18 |
|
| 19 |
Parameters: |
| 20 |
- L, edge length of the quadratic base |
| 21 |
- H, height |
| 22 |
- alpha, dihedral angle $\alpha$ between the base and a side face. |
| 23 |
|
| 24 |
Constraint: |
| 25 |
|
| 26 |
$H \le \dfrac{\tan\alpha}{2} L$ |
| 27 |
|
| 28 |
#### Usage |
| 29 |
|
| 30 |
As for any other [Form factor](/ref/sample/particle/ff). |
| 31 |
|
| 32 |
#### Implementation |
| 33 |
|
| 34 |
Class [Pyramid4]({{% url-src %}}/Sample/HardParticle/Polyhedra.h) inherits from the interface class |
| 35 |
{{% ref-class "Sample/Particle" "Formfactor" %}}. |
| 36 |
|
| 37 |
Form factor computation is based on the generic form factor of a polyhedron |
| 38 |
provided by {{% link-libformfactor %}}. |
| 39 |
|
| 40 |
|
| 41 |
Volume [has been validated]({{% url-src %}}/Tests/Unit/Sample/FormfactorBasicTest.cpp) |
| 42 |
against |
| 43 |
$$ V=\dfrac{L^3\tan\alpha}{6}\Big[1-\Big(1-\dfrac{2H}{L\tan\alpha}\Big)^3\Big]. $$ |
| 44 |
|
| 45 |
#### Related shapes |
| 46 |
|
| 47 |
More general: |
| 48 |
- [Pyramid2](/ref/sample/particle/ff/hard/pyramid2), if base is rectangular. |
| 49 |
|
| 50 |
#### Example |
| 51 |
|
| 52 |
Scattering by uncorrelated, oriented pyramids for horizontal incidence. Rotation around $z$ axis: |
| 53 |
|
| 54 |
<img src="/img/auto/ff/Pyramid4.png"> |
| 55 |
|
| 56 |
Generated by {{% ref-ex "sas/sas-ff.py" %}} (`particle_geometry=Pyramid4`). |
| 57 |
|
| 58 |
#### History |
| 59 |
|
| 60 |
Was named "Pyramid" up to BornAgain 1.19. |
| 61 |
|
| 62 |
Corresponds to "Pyramid" form factor of IsGISAXS [Lazzari, IsGISAXS manual v2.6 (2006)](http://www.insp.upmc.fr/oxydes/IsGISAXS/figures/doc/manual.html), Eq. 2.25 and "Square basis pyramid" [Renaud et al, Surf Sci Rep 64, 255 (2009)](https://doi.org/10.1016/j.surfrep.2009.07.002), Eq. 215, |
| 63 |
except for different parametrization $L = 2R_{IsGISXAXS}$ and a corrected sign. |
| 64 |
|
| 65 |
Reimplemented in BornAgain 1.6 using the generic form factor of a polyhedron |
| 66 |
[Wuttke, J Appl Cryst 54, 580 (2021)](https://doi.org/10.1107/S1600576721001710), |
| 67 |
to achieve numerical stability near the removable singularity at $q \to 0$. |