|
Programming Reference for VirtualLab Fusion
2022.1
|
This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
This is the base class for all optical interfaces which can be described by a profile height function h(x, y). The profile height corresponds to the z-position of the optical interface at a given lateral position.
More...
Public Member Functions | |
| void | CalculateInterfaceDerivativeDXDY (VectorD position, out double mx, out double my, bool calculateFirstDerivative=true, bool useScaling=true) |
| Calculates the derivative of the interface in x- and y-direction on the specified position. Both derivatives are set to zero if the interface is quantized, pixelated or if we are outside the inner definition area. Scaling is also considered by this function. More... | |
| virtual Vector3D | CalculateNormalVector (VectorD position) |
| Calculates the normal vector for the given lateral position. The normal vector points always in positive z-direction. To invert the normal vector (so that it shows in negative z-direction) multiply -1. An inversion is necessary to calculate the refraction of rays traveling in negative z-direction. More... | |
| void | CalculateSecondDerivative (VectorD position, out double secondDerivativeX, out double secondDerivativeY) |
| Calculates the second derivative of the interface profile in x- and y-direction on the specified position. Both derivatives are set to zero if the interface is quantized, pixelated or if we are outside the inner definition area. Scaling is also considered by this function. More... | |
| double | EvaluateHeightOutsideInnerDefinitionArea (bool includeQuantization=true) |
| public method to evaluate the height outside the inner definition area More... | |
| double | EvaluateHeightOutsideOuterDefinitionArea (bool includeQuantization=true) |
| public method to evaluate the height outside the outer definition area More... | |
| bool | GetIntersectionPoint (ref PlaneWaveData ray, ref double zPosition, bool findLeftRightTransition, out Vector3D normalVector) |
| This function handles the apertures, periodization and scaling. GetIntersectionPointOfElementaryInterface is called by this function and handles the elementary interface. More... | |
| double[] | GetIntersectionsWithLine (double zPos, double lineShift, bool searchParallelToXAxis, double minValueOfFreeCoordinate, double maxValueOfFreeCoordinate, double transitionPointAccuracy, out double[] signOfDerivatives) |
| Calculate the intersections of the surface with a line parallel to X-axis or to Y-axis with given start and end coordinate. May be overridden in derived interfaces. More... | |
| override PointInterfaceRelation | GetPointInterfaceRelation (Vector3D position) |
| Checks the position of a point relative to the interface. A point can be in the medium on the right side of a interface, in the medium on the left side of the interface or lateral outside of the interface. More... | |
| override sealed List< VectorD > | GetPolygonPoints (double startCoordinate, double endCoordinate, double accuracyFactor=1) |
| Gets the polygon points representing this interface including scaling, periodization, consideration of the definition areas, ... More... | |
| bool | IsAbsorbingAtPosition (VectorD position) |
| Returns true if the interface absorbs the light at the position (x,y), otherwise false. More... | |
| override bool | IsConsistent (ref List< ConsistenyErrorOrWarning > errorList, EditedInType editedFrom=EditedInType.Component) |
| Method to check whether the interface is defined consistently. More... | |
| VectorD | MinimumFeatureSize (double accuracyFactor) |
| Gets the minimum feature size of the interface. More... | |
| double | ProfileHeight (double x, double y) |
| Profile height calculation which includes pixelation, quantization and scaling in x-, y- and z- direction. More... | |
| double | ProfileHeight (VectorD position) |
| Profile height calculation which includes pixelation, quantization and scaling in x-, y- and z- direction. More... | |
| double | ProfileHeight (VectorD position, out bool isAbsorbed) |
| Profile height calculation which includes pixelation, quantization and scaling in x-, y- and z- direction. More... | |
| double | ProfileHeight (VectorD position, out bool isAbsorbed, bool includeQuantization, bool subtractHeightOffset=true, double? nanValue=null) |
| profile height calculation which includes pixelation, quantization and scaling in x-, y- and z-direction More... | |
Public Member Functions inherited from OpticalInterface | |
| double | GetZExtension () |
| Gets the overall extension of the interface. More... | |
| void | GetZExtension (out double negZDir, out double posZDir, bool applyQuantization=true) |
| The z-extension of the optical interface. Quantization and pixelation effects are considered. More... | |
| void | GetZExtensionOnElementaryCell (out double negZCell, out double posCell) |
| The z-extension of the optical interface on elementary cell. More... | |
| void | GetZExtensionOnInnerArea (out double negZArea, out double posArea) |
| The z-extension of the optical interface on inner definition area. More... | |
| void | GetZExtensionOnInnerShape (out double negZDir, out double posZDir, bool includeQuantization) |
| The z-extension of the optical interface on shape of inner definition area. More... | |
| void | GetZExtensionOnOuterShape (out double negZDir, out double posZDir, bool includeQuantization) |
| The z-extension of the optical interface on shape of outer definition area. More... | |
Properties | |
| virtual bool | ContainsFresnelZones [get, set] |
| If true the interpolation and the finding of ray intersection points is optimized for optical interfaces the contains Fresnel zones. That are interfaces that may contain 2Pi, 4Pi, 6Pi, ... jumps. The sampling points represent the height of the interface on a special point and are interpolated using a cubic interpolation. The interpolation maintains the Fresnel zones. If false the interpolation and finding of the ray intersection points is optimized for function that have hight frequency interface profiles but no Fresnel zones. Multiple ray intersections are taken into account. Setting this property to true will set the IsPixelated and IsSmoothInterface properties to false. | |
| double | FresnelZonesRelativePositionOnZAxis [get, set] |
| Gets and sets the relative position on the z-axis for the Fresnel zones. More... | |
| bool | IsPeriodical [get, set] |
| If true the structure is periodical. Otherwise non periodical. | |
| virtual bool | IsQuantized [get, set] |
| If true it indicates that the height profile has discrete height levels. Only pixelated height profiles can be quantized. This means if somebody changes this flag to true the IsPixelated flag will be also set to true. | |
| bool | IsRotationalSymmetric [get] |
| Gets whether the given surface is rotational symmetric. The following conditions must be fulfilled for rational symmetry: More... | |
| virtual int | NumberOfHeightLevels [get, set] |
| Contains the number of height levels of a quantized height profile. If a specific number of height levels is set the IsQuantized flag is switched to true. | |
| virtual VectorD | Period [get, set] |
| The period length in x and y direction of the grating used for 2d and 3d rigorous analysis. If the structure is not periodical the period must be equal to the aperture diameter of the optical interface. The default value of the period is equal to the aperture size so the element is not really periodically. | |
| VectorD | PixelSize [get, set] |
| For pixelated interfaces only. If IsPixelated is false the property may return any value. | |
| virtual double | TotalProfileHeight [get, set] |
| For interfaces with Fresnel zones only. The total height of the profile. This means the height of the 2Pi, 4Pi, ... jumps of the interface. If ContainsFresnelZones is false the property may return any value. | |
Properties inherited from OpticalInterface | |
| bool | Coated [get] |
| gets whether the interface is coated | |
| CoatingBase | Coating [get, set] |
| gets and sets the coating if there is one | |
| CoatingOrientation | CoatingOrientation [get, set] |
| Gets and sets the orientation of a coating: Is it on the front side of its surface or on the back side? This has an effect on the order in which the layer sequence will be considered during simulation. | |
| DefinitionAreaSettings | DefinitionArea [get, set] |
| Gets and sets the outer definition area (all periods) of the optical interface. Can be overridden in derived classes. More... | |
| DefinitionAreaSettings | DefinitionAreaElementaryCell [get, set] |
| Gets and sets the inner definition area (elementary cell = one period) of the optical interface. Can be overridden in derived classes. More... | |
| double | ScalingAlpha [get, set] |
| property to set and get scaling factor for scaling in z-direction. | |
| double | ScalingBeta [get, set] |
| property to set and get scaling factor for scaling in x-direction | |
| double | ScalingGamma [get, set] |
| property to set and get scaling factor for scaling in y-direction | |
This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
This is the base class for all optical interfaces which can be described by a profile height function h(x, y). The profile height corresponds to the z-position of the optical interface at a given lateral position.
| void CalculateInterfaceDerivativeDXDY | ( | VectorD | position, |
| out double | mx, | ||
| out double | my, | ||
| bool | calculateFirstDerivative = true, |
||
| bool | useScaling = true |
||
| ) |
Calculates the derivative of the interface in x- and y-direction on the specified position. Both derivatives are set to zero if the interface is quantized, pixelated or if we are outside the inner definition area. Scaling is also considered by this function.
| position | Position to calculate the derivative on. |
| mx | The derivative in x-direction |
| my | The derivative in y-direction |
| calculateFirstDerivative | Optional parameter specifying whether to use this function to calculate the first (true= or second (false) derivative of the height profile. |
| useScaling | Optional parameter specifying whether to scale the derivative according to ScalingAlpha. ScalingBeta, and ScalingGamma. Needs only to be false for the numerical calculation of the second derivative to avoid scaling twice. |
Calculates the normal vector for the given lateral position. The normal vector points always in positive z-direction. To invert the normal vector (so that it shows in negative z-direction) multiply -1. An inversion is necessary to calculate the refraction of rays traveling in negative z-direction.
| position | Lateral position for the normal vector calculation. |
| void CalculateSecondDerivative | ( | VectorD | position, |
| out double | secondDerivativeX, | ||
| out double | secondDerivativeY | ||
| ) |
Calculates the second derivative of the interface profile in x- and y-direction on the specified position. Both derivatives are set to zero if the interface is quantized, pixelated or if we are outside the inner definition area. Scaling is also considered by this function.
| position | Position to calculate the derivative on. |
| secondDerivativeX | The second derivative in x-direction |
| secondDerivativeY | The second derivative in y-direction |
| double EvaluateHeightOutsideInnerDefinitionArea | ( | bool | includeQuantization = true | ) |
public method to evaluate the height outside the inner definition area
| includeQuantization | Optional parameter to indicate whether the calling function treats the quantization correctly. Needs to be set to false if the z-extension of the unquantized interface is determined to calculate the height levels of the quantized interface. |
| double EvaluateHeightOutsideOuterDefinitionArea | ( | bool | includeQuantization = true | ) |
public method to evaluate the height outside the outer definition area
| includeQuantization | Optional parameter to indicate whether the calling function treats the quantization correctly. Needs to be set to false if the z-extension of the unquantized interface is determined to calculate the height levels of the quantized interface. |
| bool GetIntersectionPoint | ( | ref PlaneWaveData | ray, |
| ref double | zPosition, | ||
| bool | findLeftRightTransition, | ||
| out Vector3D | normalVector | ||
| ) |
This function handles the apertures, periodization and scaling. GetIntersectionPointOfElementaryInterface is called by this function and handles the elementary interface.
This function calculates the intersection point between the input ray and the present interface. The search is always done in the propagation direction of the ray. This means is the IsPositiveZ property of the ray is true then the search runs in positive z-direction. If the IsPositiveZ property is false the search runs in negative z-direction. After success it returns the position of the intersection point and the normal vector of the interface.
| ray | In the beginning of the function this ray is the incident ray. After the success of the function the x,y position of the ray is the x,y position of the intersection point. |
| zPosition | The z-position of the ray. Since all rays start and end usually in the same plane the z-position is not stored inside the PlaneWaveData structure. So during the tracing of one PlaneWaveData the z-position has to be stored separate. |
///
| findLeftRightTransition | If true the function tries to find an interface transition between the medium globally on the left side of the interface and the medium globally on the right side of the interface. If false the function tries to find an interface transition between the medium on the right side of the interface and on the medium on the left side of the interface. |
| normalVector | The normal vector of the interface on the intersection point. The normal vector points in positive z-direction for rays traveling in positive z-direction and it points in negative z-direction for rays traveling in negative z-direction. |
| double[] GetIntersectionsWithLine | ( | double | zPos, |
| double | lineShift, | ||
| bool | searchParallelToXAxis, | ||
| double | minValueOfFreeCoordinate, | ||
| double | maxValueOfFreeCoordinate, | ||
| double | transitionPointAccuracy, | ||
| out double[] | signOfDerivatives | ||
| ) |
Calculate the intersections of the surface with a line parallel to X-axis or to Y-axis with given start and end coordinate. May be overridden in derived interfaces.
| zPos | Z-position of the line (2-D FMM) that is searched for media transitions. Must be given in interface cs(!) |
| lineShift | Line shift (1) on Y-axis iff searchParallelXAxis == true, (2) on X-axis iff searchParallelXAxis == false |
| searchParallelToXAxis | Iff true, the search line is parallel to X-axis; iff false, search line is parallel to Y-axis |
| minValueOfFreeCoordinate | Start coordinate on the line. Interface coordinates. |
| maxValueOfFreeCoordinate | End coordinate on the line. Interface coordinates. |
| transitionPointAccuracy | Accuracy Factor. |
| signOfDerivatives | Out parameter for sign of derivatives at intersection points. |
Null if no intersections can be found.| override PointInterfaceRelation GetPointInterfaceRelation | ( | Vector3D | position | ) |
Checks the position of a point relative to the interface. A point can be in the medium on the right side of a interface, in the medium on the left side of the interface or lateral outside of the interface.
| position | The position to check. |
| override sealed List< VectorD > GetPolygonPoints | ( | double | startCoordinate, |
| double | endCoordinate, | ||
| double | accuracyFactor = 1 |
||
| ) |
Gets the polygon points representing this interface including scaling, periodization, consideration of the definition areas, ...
| startCoordinate | The x-coordinate of the start point (y = 0). |
| endCoordinate | The x-coordinate of the end point (y = 0). |
| accuracyFactor | The accuracy factor. This optional parameter is equal to one by default. 20 × the accuracy polygon points are calculated whereas it is ensured that an odd number of polygon points is returned. |
| bool IsAbsorbingAtPosition | ( | VectorD | position | ) |
Returns true if the interface absorbs the light at the position (x,y), otherwise false.
| position | The lateral position to check. |
| override bool IsConsistent | ( | ref List< ConsistenyErrorOrWarning > | errorList, |
| EditedInType | editedFrom = EditedInType.Component |
||
| ) |
Method to check whether the interface is defined consistently.
| errorList | Reference to a list which can already contain some messages. If the interface is inconsistent the error messages are appended to this list. If null, a new list is created. |
| editedFrom | Specifies from where this interface is edited. If this optional parameter is set to EditedInType.Catalog then a SpreadSheetObject having no subsequent medium is allowed even if AllowedSubsequentMedium is true. The reasoning for this optional parameter is that optical interfaces in the catalog do not have a subsequent medium. |
true, if the interface is consistent, otherwise false.| VectorD MinimumFeatureSize | ( | double | accuracyFactor | ) |
Gets the minimum feature size of the interface.
| accuracyFactor | The accuracy factor used for the calculation of the minimum feature size. |
| double ProfileHeight | ( | double | x, |
| double | y | ||
| ) |
Profile height calculation which includes pixelation, quantization and scaling in x-, y- and z- direction.
| x | The lateral x-position. |
| y | The lateral y-position. |
| double ProfileHeight | ( | VectorD | position | ) |
Profile height calculation which includes pixelation, quantization and scaling in x-, y- and z- direction.
| position | Position on which the height profile shall be calculated. |
| double ProfileHeight | ( | VectorD | position, |
| out bool | isAbsorbed | ||
| ) |
Profile height calculation which includes pixelation, quantization and scaling in x-, y- and z- direction.
| position | the position on which the height profile shall be calculated |
| isAbsorbed | Out parameter specifying whether or not light on the given position is absorbed by an aperture. |
| double ProfileHeight | ( | VectorD | position, |
| out bool | isAbsorbed, | ||
| bool | includeQuantization, | ||
| bool | subtractHeightOffset = true, |
||
| double? | nanValue = null |
||
| ) |
profile height calculation which includes pixelation, quantization and scaling in x-, y- and z-direction
| position | the position on which the height profile shall be calculated |
| isAbsorbed | Out parameter specifying whether or not light on the given position is absorbed by an aperture. |
| includeQuantization | To apply quantization one needs to know the total profile height (without quantization). Thus this parameters allows to switch of the quantization during calculation of that total profile height. |
| subtractHeightOffset | Optional parameter to avoid recursion - as the offset to be subtracted is the height at the position (0, 0) without the offset subtracted. |
| nanValue | The value with which NaNs are replaced. If this optional parameter is not specified, the value outside the (inner) definition area is used. |
|
getset |
Gets and sets the relative position on the z-axis for the Fresnel zones.
|
get |
Gets whether the given surface is rotational symmetric. The following conditions must be fulfilled for rational symmetry: