API design
Conventions
Right-handedness
All coordinate systems are or must be defined right-handed! All normal vectors are or must be defined right-handed! All rotations are or must be performed in a counter-clockwise manner for a positive rotation angle $\theta > 0$ and vice-versa! For a definition of rotation matrix order, refer to this article.
Failure to comply with this convention can lead to spurious effects and silent bugs when using the kinematic API of this package!
Intersect - Interact - Repeat - Loop (IIRP)
Tracing
Retracing
CPU and GPU
Geometry representation
Meshes
Signed Distance Functions (SDFs)
For an introduction into SDFs the website of Inigo Quilez is referred to. The following shapes have been implemented:
julia> BeamletOptics.list_subtypes(BeamletOptics.AbstractSDF);
└── BeamletOptics.AbstractSDF ├── BeamletOptics.AbstractLensSDF │ ├── BeamletOptics.AbstractAsphericalSurfaceSDF │ │ ├── BeamletOptics.ConcaveAsphericalSurfaceSDF │ │ └── BeamletOptics.ConvexAsphericalSurfaceSDF │ ├── BeamletOptics.AbstractCylindricalSurfaceSDF │ │ └── BeamletOptics.AbstractAcylindricalSurfaceSDF │ │ ├── BeamletOptics.AconcaveCylinderSDF │ │ └── BeamletOptics.AconvexCylinderSDF │ ├── BeamletOptics.AbstractSphericalSurfaceSDF │ │ ├── BeamletOptics.ConcaveSphericalSurfaceSDF │ │ └── BeamletOptics.ConvexSphericalSurfaceSDF │ ├── BeamletOptics.ConcaveCylinderSDF │ ├── BeamletOptics.ConvexCylinderSDF │ ├── BeamletOptics.MeniscusLensSDF │ ├── BeamletOptics.PlanoSurfaceSDF │ └── BeamletOptics.SphereSDF ├── BeamletOptics.BoxSDF ├── BeamletOptics.CutSphereSDF ├── BeamletOptics.CylinderSDF ├── BeamletOptics.RightAnglePrismSDF ├── BeamletOptics.RingSDF └── BeamletOptics.UnionSDF At least 22 types have been found.