Skip to content
Projects

Aperture2D

The equations of simgeometry.objects.aperture2d, declared on the code that implements them and checked by the tests.

Aperture2D

classsource

Two plates mirrored about a beam axis: a slit, or the 2D cut of a round aperture.

plates
P±={(sk, c±rk)}k,S=P−∪P+P_\pm = \{(s_k,\ c \pm r_k)\}_k, \qquad S = P_- \cup P_+
level set
ϕ(p)=±min⁡edges of P±∣p−a−clip⁡ ⁣((p−a)⋅e∣e∣2,0,1)e∣\phi(p) = \pm \min_{\text{edges of } P_\pm} \left| p - a - \operatorname{clip}\!\left(\tfrac{(p - a)\cdot e}{|e|^2}, 0, 1\right) e \right|
Assumes
  • the profile (sk,rk)(s_k, r_k): ss along the beam axis, rr across it from the centre line at cc = position
  • each plate is a Polygon: even-odd rule inside its half-open bounding box
  • ϕ\phi is negative inside a plate and exact while the plates are apart (every rk>0r_k > 0), a bound otherwise
Built from