public static class Interpolator.BezierInterpolator extends Interpolator
Basically, a cubic Bezier curve is created with start point (0,0) and endpoint (1,1). The other two control points (px1, py1) and (px2, py2) are given by the user, where px1, py1, px1, and px2 are all in the range [0,1].
Interpolator.BezierInterpolatorLINEAR, LOG2| Constructor and Description |
|---|
BezierInterpolator(float px1,
float py1,
float px2,
float py2)
constructor -- cubic bezier curve will be represented by control
points (0,0) (px1,py1) (px2,py2) (1,1) -- px1, py1, px2, py2 all in
range [0,1]
|
| Modifier and Type | Method and Description |
|---|---|
Point2D |
getControl1() |
Point2D |
getControl2() |
float |
interpolate(float x)
get the y-value of the cubic bezier curve that corresponds to the x
input
|
newBezierInterpolatorpublic BezierInterpolator(float px1,
float py1,
float px2,
float py2)
px1 - is x-coordinate of first control point, in range [0,1]py1 - is y-coordinate of first control point, in range [0,1]px2 - is x-coordinate of second control point, in range [0,1]py2 - is y-coordinate of second control point, in range [0,1]public Point2D getControl1()
public Point2D getControl2()
public float interpolate(float x)
interpolate in class Interpolatorx - is x-value of cubic bezier curve, in range [0,1]Copyright © 2007–2015 Gephi Consortium. All rights reserved.