MicrosphereProjectionInterpolator algorithm.
| Modifier and Type | Class and Description |
|---|---|
| private static class | InterpolatingMicrosphere.
Microsphere "facet" (surface element). |
| private static class | InterpolatingMicrosphere.
Data associated with each |
| Modifier and Type | Field and Description |
|---|---|
| private final double | background
Background value. |
| private final double | darkThreshold
Lowest non-zero illumination. |
| private final int | dimension
Space dimension. |
| private final double | maxDarkFraction
Maximum fraction of the facets that can be dark. |
| private final List | microsphere
Microsphere. |
| private final List | microsphereData
Microsphere data. |
| private final int | size
Number of surface elements. |
| Access | Constructor and Description |
|---|---|
| protected | InterpolatingMicrosphere(int
Dimension of the data space. dimension, int Number of surface elements of the sphere. size, double Maximum fraction of the facets that can be dark.
If the fraction of "non-illuminated" facets is larger, no estimation
of the value will be performed, and the maxDarkFraction, double background value will
be returned instead.Value of the illumination below which a facet is
considered dark. darkThreshold, double Value returned when the background)maxDarkFraction
threshold is exceeded.Create an unitialiazed sphere. |
| public | InterpolatingMicrosphere(int
Dimension of the data space. dimension, int Number of surface elements of the sphere. size, double Maximum fraction of the facets that can be dark.
If the fraction of "non-illuminated" facets is larger, no estimation
of the value will be performed, and the maxDarkFraction, double background value will
be returned instead.Value of the illumination below which a facet
is considered dark. darkThreshold, double Value returned when the background, UnitSphereRandomVectorGenerator maxDarkFraction
threshold is exceeded.Unit vector generator for creating the microsphere. rand)Create a sphere from randomly sampled vectors. |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected void | add(double[]
Facet's normal vector. normal, boolean Whether to copy the given array. copy)Replace |
| private void | |
| public InterpolatingMicrosphere | |
| public int | |
| public int | |
| private void | illuminate(double[]
Vector whose origin is at the interpolation
point and tail is at the sample location. sampleDirection, double Data value of the sample. sampleValue, double Weight. weight)Illumination. |
| private double | Returns: the value estimated from the current illumination of the microsphere.Interpolation. |
| public double | Returns: the estimated value at the givenpoint.Interpolation point. point, double[][] Sampling data points. samplePoints, double[] Sampling data values at the corresponding
sampleValues, double samplePoints.Exponent used in the power law that computes
the weights (distance dimming factor) of the sample data. exponent, double When the distance between the
noInterpolationTolerance)point and one of the samplePoints is less than
this value, no interpolation will be performed, and the value
of the sample will just be returned.Estimate the value at the requested location. |
| background | back to summary |
|---|---|
| private final double background Background value. | |
| darkThreshold | back to summary |
|---|---|
| private final double darkThreshold Lowest non-zero illumination. | |
| dimension | back to summary |
|---|---|
| private final int dimension Space dimension. | |
| maxDarkFraction | back to summary |
|---|---|
| private final double maxDarkFraction Maximum fraction of the facets that can be dark. | |
| microsphere | back to summary |
|---|---|
| private final List<InterpolatingMicrosphere. Microsphere. | |
| microsphereData | back to summary |
|---|---|
| private final List<InterpolatingMicrosphere. Microsphere data. | |
| size | back to summary |
|---|---|
| private final int size Number of surface elements. | |
| InterpolatingMicrosphere | back to summary |
|---|---|
| protected InterpolatingMicrosphere(int dimension, int size, double maxDarkFraction, double darkThreshold, double background) Create an unitialiazed sphere.
Sub-classes are responsible for calling the
| |
| InterpolatingMicrosphere | back to summary |
|---|---|
| public InterpolatingMicrosphere(int dimension, int size, double maxDarkFraction, double darkThreshold, double background, UnitSphereRandomVectorGenerator rand) Create a sphere from randomly sampled vectors.
| |
| InterpolatingMicrosphere | back to summary |
|---|---|
| protected InterpolatingMicrosphere(InterpolatingMicrosphere other) Copy constructor.
| |
| add | back to summary |
|---|---|
| protected void add(double[] normal, boolean copy) Replace
| |
| clear | back to summary |
|---|---|
| private void clear() Reset the all the | |
| copy | back to summary |
|---|---|
| public InterpolatingMicrosphere copy() Perform a copy.
| |
| getDimension | back to summary |
|---|---|
| public int getDimension() Get the space dimensionality.
| |
| getSize | back to summary |
|---|---|
| public int getSize() Get the size of the sphere.
| |
| illuminate | back to summary |
|---|---|
| private void illuminate(double[] sampleDirection, double sampleValue, double weight) Illumination.
| |
| interpolate | back to summary |
|---|---|
| private double interpolate() Interpolation.
| |
| value | back to summary |
|---|---|
| public double value(double[] point, double[][] samplePoints, double[] sampleValues, double exponent, double noInterpolationTolerance) Estimate the value at the requested location.
This microsphere is placed at the given
| |
| Modifier and Type | Field and Description |
|---|---|
| private final double[] | normal
Normal vector characterizing a surface element. |
| Access | Constructor and Description |
|---|---|
| pack-priv | Facet(double[]
Normal vector characterizing a surface element
of the microsphere. No copy is made. n)
|
| Modifier and Type | Method and Description |
|---|---|
| public double[] |
| normal | back to summary |
|---|---|
| private final double[] normal Normal vector characterizing a surface element. | |
| Facet | back to summary |
|---|---|
pack-priv Facet(double[] n)
| |
| getNormal | back to summary |
|---|---|
| public double[] getNormal() Return a reference to the vector normal to this facet.
| |
Facet.
| Modifier and Type | Field and Description |
|---|---|
| private final double | illumination
Illumination received from the sample. |
| private final double | sample
Data value of the sample. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public double | |
| public double |
| illumination | back to summary |
|---|---|
| private final double illumination Illumination received from the sample. | |
| sample | back to summary |
|---|---|
| private final double sample Data value of the sample. | |
| FacetData | back to summary |
|---|---|
pack-priv FacetData(double illumination, double sample)
| |
| illumination | back to summary |
|---|---|
| public double illumination() Get the illumination.
| |
| sample | back to summary |
|---|---|
| public double sample() Get the data value.
| |