[Contents]   [Back]   [Prev]   [Up]   [Next]   [Forward]  


Program Interface

(require 'fresnel-equations)

Function: combine-layers th_i w layers
layers is a list of lists of index-of-refraction and thickness. The index-of-refraction may be a complex number or a procedure of wavelength (w) in meters returning a complex number.

Layers with negative thickness are modeled as incoherent (with positive thickness); otherwise as coherent (with inteference fringing).

The index-of-refraction of the top and bottom media are given by the first and last layers, which must have thickness 0. w is probe wavelength. th_i is the angle of the incident ray in radians.

Combine-layers returns a list of three non-negative real numbers:

The transmitted and forward ratios sum to 1.0 if layers are all dielectric (lossless). The transmitted and reverse ratios sum to 1.0 if layers are all dielectric (lossless).

Negative w computes the S-polarization, else the P-polarization.

Function: snell-law x1 x2 th-i
Real numbers x1 and x2 are the indexes of refraction of the incident and opposite side of the boundary plane between two dielectric materials. Real number th-i is the angle of incidence (from the normal of the boundary plane).

snell-law returns the exit angle (from normal) of an incident ray impinging at th-i from normal. If the ray undergoes total internal reflection, then the returned angle will not be real and should be ignored.

(snell-law 2.8 1.3 .1) => 216.71826868463917e-3
(snell-law 2.8 1.3 .3) => 689.9583515921762e-3
(snell-law 2.8 1.3 .4) => 994.9783891781343e-3
(snell-law 2.8 1.3 .5) => 1.5707963267948965-254.68865153727376e-3i

Function: snells-law z1 z2 th-i
Complex numbers z1 and z2 are the indexes of refraction of the incident and opposite side of the boundary plane between two dielectric materials. Real number th-i is the angle of incidence (from the normal of the boundary plane).

snells-law returns the exit angle (from normal) of an incident ray impinging at th-i from normal. If the ray undergoes total internal reflection, then the returned angle is bogus and should be ignored.


[Contents]   [Back]   [Prev]   [Up]   [Next]   [Forward]