Package toxi.math
Class Interpolation2D
java.lang.Object
toxi.math.Interpolation2D
Implementations of 2D interpolation functions (currently only bilinear).
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Interpolation2D
public Interpolation2D()
-
-
Method Details
-
bilinear
public static float bilinear(double x, double y, double x1, double y1, double x2, double y2, float tl, float tr, float bl, float br) - Parameters:
x
- x coord of point to filtery
- y coord of point to filterx1
- x coord of top-left cornery1
- y coord of top-left cornerx2
- x coord of bottom-right cornery2
- y coord of bottom-right cornertl
- top-left valuetr
- top-right valuebl
- bottom-left valuebr
- bottom-right value- Returns:
- interpolated value
-
bilinear
- Parameters:
p
- point to filterp1
- top-left cornerp2
- bottom-right cornertl
- top-left valuetr
- top-right valuebl
- bottom-left valuebr
- bottom-right value- Returns:
- interpolated value
-