| 1 |
+++ |
| 2 |
title = "TruncatedCube" |
| 3 |
+++ |
| 4 |
|
| 5 |
### TruncatedCube |
| 6 |
|
| 7 |
A cube whose eight vertices have been removed. The truncated part of each vertex |
| 8 |
is a trirectangular tetrahedron. |
| 9 |
|
| 10 |
<img src="/img/draw/ff/3d/TruncatedCube.png" width="30%" > |
| 11 |
<img src="/img/draw/ff/2d/TruncatedCube_xy.svg" width="30%"> |
| 12 |
<img src="/img/draw/ff/2d/TruncatedCube_xz.svg" width="30%"> |
| 13 |
|
| 14 |
#### Constructor |
| 15 |
|
| 16 |
```python |
| 17 |
TruncatedCube(L, t) |
| 18 |
``` |
| 19 |
|
| 20 |
Parameters: |
| 21 |
- L, length of the full cube |
| 22 |
- t, side length of the trirectangular tetrahedron removed from the cube’s vertices |
| 23 |
|
| 24 |
Constraint: |
| 25 |
|
| 26 |
$ t \le L/2 $ |
| 27 |
|
| 28 |
#### Usage |
| 29 |
|
| 30 |
As for any other [Form factor](/ref/sample/particle/ff). |
| 31 |
|
| 32 |
#### Implementation |
| 33 |
|
| 34 |
Class [TruncatedCube]({{% 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 |
Volume [has been validated]({{% url-src %}}/Tests/Unit/Sample/FormfactorBasicTest.cpp) |
| 41 |
against |
| 42 |
$$ V= L^3 - \dfrac{4}{3} t^3. $$ |
| 43 |
|
| 44 |
#### Related shapes |
| 45 |
|
| 46 |
- [Box](/ref/sample/particle/ff/hard/box), a rectangular cuboid. |
| 47 |
- [CantellatedCube](/ref/sample/particle/ff/hard/cantellatedcube), if truncated edges and vertices. |
| 48 |
|
| 49 |
#### Example |
| 50 |
|
| 51 |
Scattering by uncorrelated, oriented truncated cubes for horizontal incidence. Rotation around $z$ axis: |
| 52 |
|
| 53 |
<img src="/img/auto/ff/TruncatedCube.png"> |
| 54 |
|
| 55 |
Generated by {{% ref-ex "sas/sas-ff.py" %}} (`particle_geometry=TruncatedCube`). |
| 56 |
|
| 57 |
#### History |
| 58 |
|
| 59 |
Reimplemented in BornAgain 1.6 using the generic polyhedron form factor [Wuttke, J Appl Cryst 54, 580 (2021)](https://doi.org/10.1107/S1600576721001710). Motivated by [Croset, J Appl Cryst 50, 1245 (2017)](https://doi.org/10.1107/S1600576717010147). |