STL2SASSCATTERING WORKBENCH
Runs on your deviceMVP 0.1
REAL-SPACE MODEL → RECIPROCAL-SPACE PATTERN

From shape to scattering.

Rotate a particle. Watch its scattering change.

REAL SPACE

Triaxial ellipsoid

EXAMPLE
20,000 points
↔ Drag to rotate · scroll to zoomLIVE
Filling particle volume…
Orientation
RECIPROCAL SPACE

2D scattering planes

Initializing
XYbeam ∥ Z
qᵧqₓ
−0.320+0.32
XZbeam ∥ Y
q𝓏qₓ
−0.320+0.32
YZbeam ∥ X
q𝓏qᵧ
−0.320+0.32
I(q) / I(0)10⁻⁵
1LOG SCALE
↗

Three fixed laboratory planes, one rotating particle.
128² pixels per plane · q in nm⁻¹

Hover over a detector to inspect q and intensity.
SCATTERING PROFILES

A closer look at I(q)

Plane averages follow orientation.
The isotropic average stays fixed.

IsotropicXYXZYZ
Waiting for model…
SCATTERING POINTS—uniform volume sampling
LAST CALCULATION—three 128 × 128 planes
RADIUS OF GYRATION—estimated from sampled points
SAMPLING FLOOR—finite-point noise ≈ 1 / N
THE METHOD

A fast path from volume to scattering.

Uniform random points fill the enclosed model. For a single particle of constant scattering-length density, the normalized intensity is:

P(q) = | Σⱼ exp(i q · R rⱼ) / N |²

We rotate the same points, project them onto XY, XZ and YZ, then apply a 2D FFT to each density projection. Cloud-in-cell deposition, a 2× oversampled grid, and a window correction reduce gridding error. The central pixel is exactly 1.

At fixed detector size, rotation and deposition scale as O(N); the three FFTs add O(M² log M), where M is the detector width. Initial mesh checks and volume sampling have a separate, geometry-dependent cost.

The isotropic average

The dark curve averages intensity over directions on a sphere, rather than averaging the three plane curves. It uses all N original volume points, Gauss–Legendre polar weights and evenly spaced azimuths. Each direction is calculated with an eight-fold oversampled 1D projection FFT. Because I(q) = I(−q), the positive hemisphere is sufficient.

This numerical spherical average is cached in the original model frame over the entire qD range, up to 120. Rotation, zoom, q range, detector resolution and physical units reuse the same values. A new model, resampling, point count or isotropic accuracy restarts its separate background worker. Its cost is O(KN + KG log G), where K is the chosen direction count and G = 8192. Live detector updates do not wait for it.

The isotropic average is approximate: both angular quadrature and gridding have finite resolution. Use Fine and compare accuracy settings for high q, elongated models or sharp minima. It retains the same finite-point self terms and approximate 1/N noise floor; it is not an exact O(N²) Debye sum.

What this MVP assumes

References: Larsen et al., Shape2SAS (2023) · SasView orientational averaging · morphsld_sas. This is an independent implementation.