Prisms
Refractive prisms are represented by the Prism type, which wraps any closed shape together with a (wavelength dependent) refractive index. The package provides constructors for prisms with a convex polygonal cross-section, i.e. right prisms: a 2D polygon in the local x-y-plane which is extruded symmetrically along the local z-axis (the height). The local origin is the origin of the polygon coordinates, and like all components the prisms can be moved freely, see Moving optical elements.
Alignment
Prisms are not aligned with the global optical axis (+y) after construction. Use the kinematic functions to orient them, e.g. zrotate3d! to rotate about the extrusion axis.
Arbitrary convex prisms
Prism accepts the corner points of the cross-section in [m] in either orientation (they are normalized to counter-clockwise). The polygon must be strictly convex, otherwise an ArgumentError is thrown. The underlying shape is the BeamletOptics.PolygonPrismSDF, whose signed distance function is exact. All faces are flat, so rays enter and leave exactly on the faces.
# a 30-60-90 prism, made from NBK7
prism = Prism([(0.0, 0.0), (30e-3, 0.0), (0.0, 17.32e-3)], 20e-3, NBK7)BeamletOptics.Prism Method
Creates a Prism with a convex polygonal cross-section, extruded along the local z-axis. The local origin is the origin of the given coordinates, i.e. the prism is placed where the vertices are, and rotations act around it. Like the RightAnglePrism the prism is not aligned with the y-axis, orient it with the kinematic functions. See PolygonPrismSDF for the geometry. See also EquilateralPrism and DovePrism.
Arguments
vertices: corners(x, y)of the cross-section in the local x-y-plane in [m], as a vector of 2D points or tuples. Both vertex orders are accepted. The polygon must be strictly convex.height: extent along the local z-axis in [m], the prism is centered atz = 0n:RefractiveIndexof the prism, or a number for a constant refractive index
BeamletOptics.PolygonPrismSDF Type
PolygonPrismSDF <: AbstractSDFImplements the exact SDF of a right prism, i.e. the extrusion of a convex polygon along the local z-axis. The local origin is the origin of the coordinates given to the constructor, it is not shifted.
Fields
vertices: corners of the cross-section in the local x-y-plane in [m], in counter-clockwise ordernormals: outward unit normals of the edges, where edgeiruns from vertexito vertexi + 1height: extent along the local z-axis in [m], the prism spansz ∈ [-height/2, height/2]
Common prisms
The EquilateralPrism is centered at the centroid of its triangle with the apex along +y and is the classic dispersing prism. A ray traversing it symmetrically at minimum deviation is deflected by DovePrism is a trapezoid with 45° end faces whose long axis is the y-axis. The RightAnglePrism has its legs along x and y.
BeamletOptics.EquilateralPrism Method
EquilateralPrism(side, height, n)Creates an equilateral triangular Prism, e.g. for dispersion. The local origin is the centroid of the triangle. The apex points along the local +y-axis and the base face has the normal -y. A beam travelling along +x or -x through the faces next to the apex at (approximately) minimum deviation is deflected towards the base.
Arguments
side: edge length of the triangular cross-section in [m], must be positiveheight: extent along the local z-axis in [m]n:RefractiveIndexof the prism, or a number for a constant refractive index
BeamletOptics.DovePrism Method
Creates a Prism with an isosceles trapezoid cross-section and 45° end faces, e.g. a Dove prism that inverts an image without deviating a beam along its axis. The long axis is the local y-axis, so that a beam travelling along +y enters the 45° end face. The base face with the normal -x is the one that totally internally reflects. The local origin is the center of the cross-section's bounding box.
Arguments
length: length of the long base face in [m], must be larger than2 * apertureaperture: distance between the base face and the parallel short face in [m], must be positiveheight: extent along the local z-axis in [m]n:RefractiveIndexof the prism, or a number for a constant refractive index
BeamletOptics.RightAnglePrism Method
RightAnglePrism(leg_length, height, n)Creates a right angle symmetric Prism. The legs are the faces with the normals -x and -y and the hypotenuse passes through the local origin, see RightAnglePrismSDF. The prism is not aligned with the y-axis.
Arguments
leg_length: dimension in x- and y-direction in [m]height: extent along the local z-axis in [m]n:RefractiveIndexof the prism, or a number for a constant refractive index