Class Interpolation2D
java.lang.Object
org.episteme.core.mathematics.analysis.interpolation.Interpolation2D
2D Interpolation methods.
Methods for interpolating values on a 2D grid or scattered points.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RealBicubic interpolation (simplified).static RealBilinear interpolation on a unit square.static Realbilinear(Real x, Real y, Real x1, Real x2, Real y1, Real y2, Real q11, Real q21, Real q12, Real q22) Bilinear interpolation on an arbitrary rectangle.
-
Constructor Details
-
Interpolation2D
public Interpolation2D()
-
-
Method Details
-
bilinear
-
bilinear
public static Real bilinear(Real x, Real y, Real x1, Real x2, Real y1, Real y2, Real q11, Real q21, Real q12, Real q22) Bilinear interpolation on an arbitrary rectangle.- Parameters:
x- target x coordinatey- target y coordinatex1- left x coordinatex2- right x coordinatey1- bottom y coordinatey2- top y coordinateq11- value at (x1, y1)q21- value at (x2, y1)q12- value at (x1, y2)q22- value at (x2, y2)- Returns:
- interpolated value at (x, y)
-
bicubic
Bicubic interpolation (simplified).Requires 16 points (4x4 grid) surrounding the target point. This implementation uses a simple convolution kernel (Catmull-Rom spline).
- Parameters:
p- 4x4 array of values. p[1][1] is top-left of the central cell. p[i][j] is value at grid point (i-1, j-1) relative to cell origin.x- normalized x coordinate within the cell (0 to 1)y- normalized y coordinate within the cell (0 to 1)- Returns:
- interpolated value
-