neutralMaterial( gray=1, wavelength=380:780 )
lensAbsorbance( age=32, wavelength=400:700 )
neutralMaterial
returns a
colorSpec object with quantity
equal to 'reflectance'
.
The reflectance of each spectrum is constant.
The number of spectra in the object is the number of gray levels = length(gray)
.
lensAbsorbance
returns a
colorSpec object with quantity
equal to 'absorbance'
.
The absorbance model for the human lens is taken from Pokorny.
The number of spectra in the object is the number of ages = length(age)
.quantity
# make a perfect reflecting diffuser (PRD)
prd = neutralMaterial( 1 )
# make a perfect transmitting filter (PTF)
ptf = prd
quantity(ptf) = 'transmittance'
# compare transmittance at 3 ages: 20, 32, and 80 years
plot( linearize(lensAbsorbance( c(20,32,80) )), col='black', lty=1:3 )
Run the code above in your browser using DataLab