# Octahedron

## Description:

The octahedron is defined by three dimensions along the two-fold axis which contain the 6 vertices. $length_a$, $length_b$ and $length_c$ are the distances from the center of the octahedron to its vertices. Coordinates of the six vertices are :
$$(length_a,0,0)\\ (-length_a,0,0)\\ (0,length_b,0)\\ (0,-length_b,0)\\ (0,0,length_c)\\ (0,0,-length_c)$$
A visualisation is given here: https://mycore.core-cloud.net/index.php/s/d11CPNr6g1P6IGR

The model is using $length_a$ and the two ratios $b2a_{ratio}$ and $c2a_{ratio}$ :
$$b2a_{ratio} = length_b/length_a\\ c2a_{ratio} = length_c/length_a$$
These three parameters are implemented with the polydispersity option.

Volume of the octahedron is:
$$V = \frac{4}{3} \cdot length_a \cdot length_b \cdot length_c = \frac{4}{3} \cdot length_a^3 \cdot b2a_{ratio} \cdot c2a_{ratio}$$

Lengths of edges are equal to :
$$A_{edge}^2 = length_a^2+length_b^2\\ B_{edge}^2 = length_a^2+length_c^2\\ C_{edge}^2 = length_b^2+length_c^2$$

For a regular octahedron :
$$b2a_{ratio} = c2a_{ratio} = 1\\ A_{edge} = B_{edge} = C_{edge} = length_a \cdot \sqrt2\\ length_a = length_b = length_c = \frac{A_{edge}}{\sqrt2}\\ V = \frac{4}{3}\cdot length_a^3 = \frac{\sqrt2}{3} \cdot A_{edge}^3$$

Amplitude of the form factor AP is calculated with a scaled scattering vector $(Qx,Qy,Qz)$ :
$$Qx = qx \cdot length_a \\ Qy = qy \cdot length_b \\ Qz = qz \cdot length_c$$
$$AP = \frac{3}{4} \cdot \frac{A+B}{Qx^2-Qy^2}$$
with :
$$A = 8 \cdot \frac{Qy \cdot \sin{Qy}-Qz \cdot \sin{Qz}}{Qy^2-Qz^2}\\ B = 8 \cdot \frac{Qz \cdot \sin{Qz}-Qx \cdot \sin{Qx}}{Qx^2-Qz^2}$$

The angles are introduced in the same way as for other parallelepiped models (like the rectangular prism). Note that the $a$, $b$ and $c$ axis are oriented from the center of the octahedron towards the vertices.
$$qa = q \cdot \sin{\theta} \cdot \cos{\phi} \\ qb = q \cdot \sin{\theta} \cdot \sin{\phi} \\ qc = q \cdot \cos{\theta}$$
$\theta$ is the angle between the $z$ axis and the $c$ axis of the octahedron ($length_c$), and $\phi$ is the angle between the scattering vector (lying in the $xy$ plane) and the $y$ axis.

The normalized form factor in 1D is obtained averaging over all possible orientations. This is the same code as for the rectangular prism model.

The example is generated in SasView using the default values (no polydispersity).

References
--------------
1. Wei-Ren Chen et al. “Scattering functions of Platonic solids”.
In:Journal of AppliedCrystallography - J APPL CRYST44 (June 2011).
https://DOI:10.1107/S0021889811011691
2. Croset, Bernard, "Form factor of any polyhedron: a general compact
formula and its singularities" In: J. Appl. Cryst. (2017). 50, 1245–1255
https://doi.org/10.1107/S1600576717010147

Authorship and Verification
----------------------------------

* **Authors: Marianne Imperor-Clerc (marianne.imperor@universite-paris-saclay.fr)
Alexandra Beikert (abeikert@gmx.de)**
* **Last Modified by MI: 9 October 2020**
* **Last Reviewed by:**

## Details:

 Created By alexandra Uploaded Oct. 14, 2020, 3:24 p.m. Category Parallelepiped Score 0 Verified This model has not been verified by a member of the SasView team In Library This model is not currently included in the SasView library. You must download the files and install it yourself. Files octahedron_h_mi.py octahedron_h_mi.c