LibCapy - lightray

LightRay class.

Macros:

Default wavelength

Enumerations:

Predefined materials index

Typedefs:

LightRay object

Struct CapyRefractiveCoeff :

Struct CapyRefractiveCoeff's properties:

Cauchy coefficients (for lambda in nanometers)

Struct CapyRefractiveCoeff's methods:

None.

Struct CapyRefractionValue :

Struct CapyRefractionValue's properties:

Struct CapyRefractionValue's methods:

None.

Functions:

Get the refractive index for given Cauchy coefficients and wavelength Inputs: coeff: the Cauchy coefficients lambda: the wavelength in nanometer

Output and side effect(s):

Return the refractive index

Estimate the Cauchy coefficients from the reflectivity Inputs: reflectivity: the reflectivity in [0,1]

Output and side effect(s):

Return the estimated Cauchy coefficients (B set to 0.0, relative to vacuum)

Get the refraction values for given refractive coefficients, angle of incidence and a default wavelength (CAPY_DEFAULT_WAVELENGTH) Inputs: coeffFrom: the Cauchy coefficients of the incoming material coeffTo: the Cauchy coefficients of the outgoing material theta: angle of incidence in radians (angle between the incoming ray of light and the normal of the interface of materials)

Output and side effect(s):

Return the refraction values when moving from a material with Cauchy coefficients 'coeffFrom' to a material with Cauchy coefficients 'coeffTo'. In other words, how much light traveling in the 'from' material goes back to the 'from' material after encountering the 'to' material.

Get the refraction values for given refractive coefficients, angle of incidence and given wavelength Inputs: coeffFrom: the Cauchy coefficients of the incoming material coeffTo: the Cauchy coefficients of the outgoing material theta: angle of incidence in radians (angle between the incoming ray of light and the normal of the interface of materials) lambda: the wavelength (in nanometer)

Output and side effect(s):

Return the refractive coeffcients for the given wavelength when moving from a material with Cauchy coefficients 'coeffFrom' to a material with Cauchy coefficients 'coeffTo' In other words, how much light traveling in the 'from' material goes back to the 'from' material after encountering the 'to' material.

Get the critical refractive angle given refractive coefficients and wavelength Inputs: coeffFrom: the Cauchy coefficients of the incoming material coeffTo: the Cauchy coefficients of the outgoing material lambda: the wavelength (in nanometer)

Output and side effect(s):

Return the critical angle in radians.

Create a CapyLightRay

Output and side effect(s):

Return a CapyLightRay

Allocate memory for a new CapyLightRay and create it

Output and side effect(s):

Return a CapyLightRay

Exception(s):

May raise CapyExc_MallocFailed.

Free the memory used by a CapyLightRay* and reset '*that' to NULL

Input argument(s):

that: a pointer to the CapyLightRay to free

2024-07-24
in LibCapy,
16 views
Copyright 2021-2024 Baillehache Pascal