public class MicrosphereInterpolator extends java.lang.Object implements MultivariateRealInterpolator
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BRIGHTNESS_EXPONENT
Default exponent used the weights calculation.
|
static int |
DEFAULT_MICROSPHERE_ELEMENTS
Default number of surface elements that composes the microsphere.
|
Constructor and Description |
---|
MicrosphereInterpolator()
Create a microsphere interpolator with default settings.
|
MicrosphereInterpolator(int microsphereElements,
int brightnessExponent)
Create a microsphere interpolator.
|
Modifier and Type | Method and Description |
---|---|
MultivariateRealFunction |
interpolate(double[][] xval,
double[] yval)
Computes an interpolating function for the data set.
|
void |
setBrightnessExponent(int exponent)
Set the brightness exponent.
|
void |
setMicropshereElements(int elements)
Set the number of microsphere elements.
|
public static final int DEFAULT_MICROSPHERE_ELEMENTS
public static final int DEFAULT_BRIGHTNESS_EXPONENT
public MicrosphereInterpolator()
Calling this constructor is equivalent to call MicrosphereInterpolator(MicrosphereInterpolator.DEFAULT_MICROSPHERE_ELEMENTS,
MicrosphereInterpolator.DEFAULT_BRIGHTNESS_EXPONENT)
.
public MicrosphereInterpolator(int microsphereElements, int brightnessExponent)
microsphereElements
- number of surface elements of the microsphere.brightnessExponent
- exponent used in the power law that computes the
weights of the sample data.NotPositiveException
- if microsphereElements <= 0
or brightnessExponent < 0
.public MultivariateRealFunction interpolate(double[][] xval, double[] yval) throws MathException, java.lang.IllegalArgumentException
interpolate
in interface MultivariateRealInterpolator
xval
- the arguments for the interpolation points.
xval[i][0]
is the first component of interpolation point
i
, xval[i][1]
is the second component, and so on
until xval[i][d-1]
, the last component of that interpolation
point (where d
is thus the dimension of the space).yval
- the values for the interpolation pointsMathException
- if arguments violate assumptions made by the
interpolation algorithm or some dimension mismatch occursjava.lang.IllegalArgumentException
- if there are no data (xval null or zero length)public void setBrightnessExponent(int exponent)
exponent
- Exponent for computing the distance dimming
factor.NotPositiveException
- if exponent < 0
.public void setMicropshereElements(int elements)
elements
- Number of surface elements of the microsphere.NotStrictlyPositiveException
- if elements <= 0
.Copyright © 2010 - 2020 Adobe. All Rights Reserved