.. _prism:

prism
=======================================================

prism of different cross-sections

============== ================================= ============ =============
Parameter      Description                       Units        Default value
============== ================================= ============ =============
scale          Scale factor or Volume fraction   None                     1
background     Source background                 |cm^-1|              0.001
sld            Prism scattering length density   |1e-6Ang^-2|           126
sld_solvent    Solvent scattering length density |1e-6Ang^-2|           9.4
n_sides        Number of sides                   None                     5
radius_average Average radius                    |Ang|                  500
length         Length                            |Ang|                 5000
============== ================================= ============ =============

The returned value is scaled to units of |cm^-1| |sr^-1|, absolute scale.


This model provides the form factor for a right prism whose cross-section is a regular polygon. 
Orientation averaging is done by using the Fibonacci quadrature.
This quadrature provides a quasi-uniform distribution of points on the unit sphere
using the golden ratio. The number of points to generate on the unit sphere is set to 500 points, it usually provides
a good balance between accuracy and computational efficiency.

**Definition**

We consider particles having the shape of a right prism of length *L* (parameter called *length* in the model) and a cross section made of 
a regular polygon with a certain number of sides *n* (parameter called *n_sides* in the model) as illustrated in the figure below.

.. figure:: img/nanoprisms_geometry.jpg

The size of a regular polygon can be characterized by its edge length E or by R, the circumradius of the polygon shown in black in the figure, with :

.. math::

    R = \frac{E}{2\sin(\pi/n)}


The apothem is the radius of the dashed circle, it is defined as:

.. math::

    R\cos(\pi/n)

For comparison purposes, it is convenient to introduce an average radius :math:`R_ave` (parameter called *radius_average* in the model). It is shown in red in the figure.
The area of the n-sided regular polygon is given by :

.. math::

   A = \pi R^{2} \, \mathrm{sinc}\left(\frac{2\pi}{n}\right)
     = \pi R_{\mathrm{ave}}^{2}

and the volume of the nanoprism is therefore given by:

.. math::

    V = L \times {A}

where :math:`R_ave` is the radius of the equivalent disc having the same area as the n-sided polygon.
It is also the squared average of the distance from the center of the polygon to any point of its perimeter. It is related to the circumradius R by :

.. math::

    R_{\mathrm{ave}}^{2} = R^{2} \, \mathrm{sinc}\left(\frac{2\pi}{n}\right)

Form factor for a prism: Following Wuttke's expression, the form factor :math:`F(\mathbf{q})` for any right prism can be decomposed into the product of two factors.
One factor corresponds to the component :math:`\mathbf{q}_{\perp}` of the scattering vector that is perpendicular to the cross section and depends
only on the length :math:`L`. The other factor is coplanar with the cross section and involves the component :math:`\mathbf{q}_{\|}`;
it depends on the number of sides :math:`n` and the edge length :math:`E` of the polygon.
The perpendicular factor is:

.. math::

   f_{\perp}(\mathbf{q}_{\perp}, L)
   = L \mathrm{sinc}(
     \frac{(\mathbf{q}_{\perp} \cdot \hat{\mathbf{n}})\, L}{2}
     )

where :math:`\hat{\mathbf{n}}` is the direction normal to the cross section.
The length :math:`L` gives rise to a standard sinc function for the form factor.

On the other hand, the parallel factor for a regular :math:`n`-sided polygon
of circumradius :math:`R` can be expressed as

.. math::

   f_{\|}(\mathbf{q}_{\|}, n, R)
   =
   \frac{2}{i q_{\|}^{2}}
   \sum_{j=1}^{n}
   \hat{\mathbf{n}} \cdot
   \left( \mathbf{q}_{\|} \times \mathbf{E}_{j} \right)
   \,
   \mathrm{sinc}\left( \mathbf{q}_{\|} \cdot \mathbf{E}_{j} \right)
   \exp(
     i \mathbf{q}_{\|} \cdot \mathbf{M}_{j})

In the sum over all edges, :math:`\mathbf{M}_{j}` is the vector joining the center of the polygon to the middle of the jth edge and
:math:`\mathbf{E}_{j}` is the half-edge vector.

The scattered intensity for one prism is given by:

.. math::

   I(\mathbf{q}, n, R, L)
   =
   \left| F(\mathbf{q}, n, R, L) \right|^{2}
   =
   \left|
     f_{\perp}(\mathbf{q}_{\perp}, L)
     f_{\|}(\mathbf{q}_{\|}, n, R)
   \right|^{2}

Orientation average: The 1D form factor corresponds to the orientation average with all the possible orientations having the same probability.
Instead of rotating the shape through all the possible orientations,
it is equivalent to integrate the 3D scattering vector over a sphere of radius q with the shape in its reference orientation.

The sphere is sampled using Fibonacci quadrature to provide a quasi-uniform distribution of points on the unit sphere.
The distribution of the N points is computed using the golden ratio (see fibonacci.py). 
Each point of the quadrature on the unit sphere corresponds to a vector :math:`\mathbf{u}_{j}`.
In the sum, all weights :math:`w_j` are taken identical and equal to :math:`\frac{1}{N}`.

.. math::

    P(q) =  \sum_{j=1}^{N} w_j I(q\mathbf{u}_{j}, n, R, L)

.. figure:: img/fibonacci_sphere.png

    Fibonacci sphere using N=5810 points.

**Validation**

The model has been tested against experimental data obtained on gold nanoprisms with pentagonal cross-section (see J. Marcone et al. JAC 2025).
Moreover, comparisons with Debye formula calculations were made using DebyeCalculator library (https://github.com/FrederikLizakJohansen/DebyeCalculator).
Good agreement was found at q < 0.1 1/Angstrom.


.. figure:: img/prism_autogenfig.png

    1D plot corresponding to the default parameters of the model.


**Source**

:download:`prism.py <src/prism.py>`

**References**

1. Marcone, J., Trazo, J. G., Nag, R., Goldmann, C., Ratel-Ramond, N., Hamon, C., & Impéror-Clerc, M. (2025).
   Form factor of prismatic particles for small-angle scattering analysis.
   *Journal of Applied Crystallography*, 58(2), 543‑552. https://doi.org/10.1107/S1600576725000676

2. Li, X., Shew, C., He, L., Meilleur, F., Myles, D. A. A., Liu, E., Zhang, Y., Smith, G. S.,
   Herwig, K. W., Pynn, R., & Chen, W. (2011). Scattering functions of Platonic solids.
   *Journal Of Applied Crystallography*, 44(3), 545‑557. https://doi.org/10.1107/s0021889811011691

3. Croset, B. (2017). Form factor of any polyhedron : a general compact formula and its singularities.
   *Journal Of Applied Crystallography*, 50(5), 1245‑1255. https://doi.org/10.1107/s1600576717010147

4. Wuttke, J. (2021). Numerically stable form factor of any polygon and polyhedron.
   *Journal Of Applied Crystallography*, 54(2), 580‑587. https://doi.org/10.1107/s1600576721001710

**Authorship and Verification**

* **Authors:** Marianne Imperor-Clerc (marianne.imperor@cnrs.fr)
             Jules Marcone (julesmarcone@gmail.com)
             Sara Mokhtari (smokhtari@insa-toulouse.fr)

* **Last Modified by:** MIC **Date:** 11 December 2025

* **Last Reviewed by:** SM **Date:** 17 April 2026


