Lenses and Other Optical Components
Lenses
A number of helper functions are provided to make constructing simple lenses easier. Firstly ordinary thick lenses:
OpticSim.SphericalLens
— FunctionSphericalLens(insidematerial, frontvertex, frontradius, backradius, thickness, semidiameter; lastmaterial = OpticSim.GlassCat.Air, nextmaterial = OpticSim.GlassCat.Air, frontsurfacereflectance = 0.0, backsurfacereflectance = 0.0, frontdecenter = (0, 0), backdecenter = (0, 0), interfacemode = ReflectOrTransmit)
Constructs a simple cylindrical lens with spherical front and back surfaces. The side walls of the lens are absorbing.
OpticSim.ConicLens
— FunctionConicLens(insidematerial, frontvertex, frontradius, frontconic, backradius, backconic, thickness, semidiameter; lastmaterial = OpticSim.GlassCat.Air, nextmaterial = OpticSim.GlassCat.Air, frontsurfacereflectance = 0.0, backsurfacereflectance = 0.0, frontdecenter = (0, 0), backdecenter = (0, 0), interfacemode = ReflectOrTransmit)
Constructs a simple cylindrical lens with front and back surfaces with a radius and conic term. The side walls of the lens are absorbing.
OpticSim.AsphericLens
— FunctionAsphericLens(insidematerial, frontvertex, frontradius, frontconic, frontaspherics, backradius, backconic, backaspherics, thickness, semidiameter; lastmaterial = OpticSim.GlassCat.Air, nextmaterial = OpticSim.GlassCat.Air, frontsurfacereflectance = 0.0, backsurfacereflectance = 0.0, frontdecenter = (0, 0), backdecenter = (0, 0), interfacemode = ReflectOrTransmit)
Cosntructs a simple cylindrical lens with front and back surfaces with a radius, conic and apsheric terms. The side walls of the lens are absorbing.
OpticSim.FresnelLens
— FunctionFresnelLens(insidematerial, frontvertex, radius, thickness, semidiameter, groovedepth; conic = 0.0, aspherics = nothing, outsidematerial = OpticSim.GlassCat.Air)
Create a Fresnel lens as a CSG object, can be concave or convex. Groove positions are found iteratively based on groovedepth
. For negative radii the vertex on the central surface is at frontvertex
, so the total thickness of the lens is thickness
+ groovedepth
. Aspherics currently not supported.
As well as idealized lenses:
OpticSim.ParaxialLens
— TypeParaxialLens{T} <: Surface{T}
surfacenormal
is the output direction of the lens. Paraxial lens cannot act as the interface between two materials, hence only a single outside material is specified, by default Air.
Create with the following functions
ParaxialLensEllipse(focaldistance, halfsizeu, halfsizev, surfacenormal, centrepoint; rotationvec = [0.0, 1.0, 0.0], outsidematerial = OpticSim.GlassCat.Air, decenteruv = (0.0, 0.0))
ParaxialLensRect(focaldistance, halfsizeu, halfsizev, surfacenormal, centrepoint; rotationvec = [0.0, 1.0, 0.0], outsidematerial = OpticSim.GlassCat.Air, decenteruv = (0.0, 0.0))
ParaxialLensHex(focaldistance, side_length, surfacenormal, centrepoint; rotationvec = [0.0, 1.0, 0.0], outsidematerial = OpticSim.GlassCat.Air, decenteruv = (0.0, 0.0))
ParaxialLensConvexPoly(focaldistance, local_frame, local_polygon_points, local_center_point; outsidematerial = OpticSim.GlassCat.Air)
Other Components
We also have some holographic elements implemented, note that these have not been extensively tested and should not be treated as wholely accurate at this stage.
It is relatively simple to extend the existing code to add these kinds of specialized surfaces providing a paired OpticalInterface
subclass is also defined. In this case the WrapperSurface
can often serve as a suitable base for extension.
OpticSim.WrapperSurface
— TypeWrapperSurface{T,S<:Surface{T}} <: Surface{T}
A generic surface type which serves as a basis for extension of Surface
s for custom OpticalInterface
subclasses. Essentially just forwards all Surface
and ParametricSurface
methods to a field of the WrapperSurface
named surface
. Also provides a generic implementation of surfaceintersection
which tests for an intersection with the underlying surface and returns either an EmptyInterval
or a half space (never a closed interval).
OpticSim.ThinGratingSurface
— TypeThinGratingSurface{T,S} <: WrapperSurface{T,S}
Surface type for use with ThinGratingInterface
.
ThinGratingSurface(surface::Surface{T}, interface::ThinGratingInterface{T})
OpticSim.HologramSurface
— TypeHologramSurface{T,S} <: WrapperSurface{T,S}
Surface type for use with HologramInterface
.
HologramSurface(surface::Surface{T}, interface::HologramInterface{T})
OpticSim.MultiHologramSurface
— TypeMultiHologramSurface{T,S} <: WrapperSurface{T,S}
Surface type for use with MultiHologramInterface
.
MultiHologramSurface(surface::Surface{T}, interface::MultiHologramInterface{T})
Eye Models
Eye models are often very useful in simulation of head mounted display systems. We have two models implemented currently.
Missing docstring for ModelEye
. Check Documenter's build log for details.
Missing docstring for ArizonaEye
. Check Documenter's build log for details.