public abstract class Interpolator extends Object
interpolate(float)
method.
This abstract class is implemented by built-in interpolators accessible as
static classes.Modifier and Type | Class and Description |
---|---|
static class |
Interpolator.BezierInterpolator
Bezier curve interpolator.
|
Modifier and Type | Field and Description |
---|---|
static Interpolator |
LINEAR
Linear interpolation
x = interpolate(x) |
static Interpolator |
LOG2
Log2 interpolation
Math.log(1 + x)/Math.log(2) = interpolate(x) |
Constructor and Description |
---|
Interpolator() |
Modifier and Type | Method and Description |
---|---|
abstract float |
interpolate(float x)
This function takes an input value between 0 and 1 and returns another
value, also between 0 and 1.
|
static Interpolator |
newBezierInterpolator(float px1,
float py1,
float px2,
float py2)
Builds a bezier interpolator with two control points (px1, py1) and (px2,
py2).
|
public static final Interpolator LINEAR
x = interpolate(x)
public static final Interpolator LOG2
Math.log(1 + x)/Math.log(2) = interpolate(x)
public static Interpolator newBezierInterpolator(float px1, float py1, float px2, float py2)
px1
- the x-coordinate of first control point, between [0, 1]py1
- the y-coordinate of first control point, between [0, 1]px2
- the x-coordinate of second control point, between [0, 1]py2
- the y-coordinate of second control point, between [0, 1]public abstract float interpolate(float x)
x
- a value between 0 and 1Copyright © 2007–2015 Gephi Consortium. All rights reserved.