|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sunflow.image.SpectralCurve
org.sunflow.image.IrregularSpectralCurve
public class IrregularSpectralCurve
This class allows spectral curves to be defined from irregularly sampled
data. Note that the wavelength array is assumed to be sorted low to high. Any
values beyond the defined range will simply be extended to infinity from the
end points. Points inside the valid range will be linearly interpolated
between the two nearest samples. No explicit error checking is performed, but
this class will run into ArrayIndexOutOfBoundsException
s if the
array lengths don't match.
Constructor Summary | |
---|---|
IrregularSpectralCurve(float[] wavelengths,
float[] amplitudes)
Define an irregular spectral curve from the provided (sorted) wavelengths and amplitude data. |
Method Summary | |
---|---|
float |
sample(float lambda)
This function determines the actual spectral curve data. |
Methods inherited from class org.sunflow.image.SpectralCurve |
---|
toXYZ |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IrregularSpectralCurve(float[] wavelengths, float[] amplitudes)
wavelengths
- sampled wavelengths in nmamplitudes
- amplitude of the curve at the sampled pointsMethod Detail |
---|
public float sample(float lambda)
SpectralCurve
sample
in class SpectralCurve
lambda
- wavelength to sample in nanometers
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |