doml.interpolation_d

Contains various interpolation functions.

@author Kai Burjack

Members

Static functions

dFdxLinear
Vector2d dFdxLinear(double v0X, double v0Y, double f0X, double f0Y, double v1X, double v1Y, double f1X, double f1Y, double v2X, double v2Y, double f2X, double f2Y, Vector2d dest)

Compute the first-order derivative of a linear two-dimensional function <i>f</i> with respect to X and store the result in <code>dest</code>. <p> This method computes the constant rate of change for <i>f</i> given the three values of <i>f</i> at the specified three inputs <code>(v0X, v0Y)</code>, <code>(v1X, v1Y)</code> and <code>(v2X, v2Y)</code>.

dFdyLinear
Vector2d dFdyLinear(double v0X, double v0Y, double f0X, double f0Y, double v1X, double v1Y, double f1X, double f1Y, double v2X, double v2Y, double f2X, double f2Y, Vector2d dest)

Compute the first-order derivative of a linear two-dimensional function <i>f</i> with respect to Y and store the result in <code>dest</code>. <p> This method computes the constant rate of change for <i>f</i> given the three values of <i>f</i> at the specified three inputs <code>(v0X, v0Y)</code>, <code>(v1X, v1Y)</code> and <code>(v2X, v2Y)</code>.

interpolateTriangle
double interpolateTriangle(double v0X, double v0Y, double f0, double v1X, double v1Y, double f1, double v2X, double v2Y, double f2, double x, double y)

Bilinearly interpolate the single scalar value <i>f</i> over the given triangle. <p> Reference: <a href="https://en.wikipedia.org/wiki/Barycentric_coordinate_system">https://en.wikipedia.org/</a>

interpolateTriangle
Vector2d interpolateTriangle(double v0X, double v0Y, double f0X, double f0Y, double v1X, double v1Y, double f1X, double f1Y, double v2X, double v2Y, double f2X, double f2Y, double x, double y, Vector2d dest)

Bilinearly interpolate the two-dimensional vector <i>f</i> over the given triangle and store the result in <code>dest</code>. <p> Reference: <a href="https://en.wikipedia.org/wiki/Barycentric_coordinate_system">https://en.wikipedia.org/</a>

interpolateTriangle
Vector3d interpolateTriangle(double v0X, double v0Y, double f0X, double f0Y, double f0Z, double v1X, double v1Y, double f1X, double f1Y, double f1Z, double v2X, double v2Y, double f2X, double f2Y, double f2Z, double x, double y, Vector3d dest)

Bilinearly interpolate the three-dimensional vector <i>f</i> over the given triangle and store the result in <code>dest</code>. <p> Reference: <a href="https://en.wikipedia.org/wiki/Barycentric_coordinate_system">https://en.wikipedia.org/</a>

interpolationFactorsTriangle
Vector3d interpolationFactorsTriangle(double v0X, double v0Y, double v1X, double v1Y, double v2X, double v2Y, double x, double y, Vector3d dest)

Compute the interpolation factors <code>(t0, t1, t2)</code> in order to interpolate an arbitrary value over a given triangle at the given point <code>(x, y)</code>. <p> This method takes in the 2D vertex positions of the three vertices of a triangle and stores in <code>dest</code> the factors <code>(t0, t1, t2)</code> in the equation <code>v' = v0 * t0 + v1 * t1 + v2 * t2</code> where <code>(v0, v1, v2)</code> are arbitrary (scalar or vector) values associated with the respective vertices of the triangle. The computed value <code>v'</code> is the interpolated value at the given position <code>(x, y)</code>.

Meta