de.cau.cs.kieler.core.math
Class CubicSplineInterpolator

java.lang.Object
  extended by de.cau.cs.kieler.core.math.CubicSplineInterpolator
All Implemented Interfaces:
ISplineInterpolator

public class CubicSplineInterpolator
extends Object
implements ISplineInterpolator

Provides a technique to calculate a piece-wise bezier spline for a list of given points. As described in "Graphic Gems, Andrew Glassner (editor), Academic Press, 1990".

Rating red

Constructor Summary
CubicSplineInterpolator()
           
 
Method Summary
 BezierSpline calculateClosedBezierSpline(KVector[] points)
          Calculates a closed piecewise bezier spline where the first point is start and end.
 BezierSpline interpolatePoints(KVector[] points)
          returns a piecewise bezierspline.
 BezierSpline interpolatePoints(KVector[] points, KVector startVec, KVector endVec, boolean tangendScale)
          returns a piecewise bezierspline.
 BezierSpline interpolatePoints(LinkedList<KVector> points)
          returns a piecewise bezierspline.
 BezierSpline interpolatePoints(LinkedList<KVector> points, KVector startVec, KVector endVec, boolean tangendScale)
          returns a piecewise bezierspline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CubicSplineInterpolator

public CubicSplineInterpolator()
Method Detail

calculateClosedBezierSpline

public BezierSpline calculateClosedBezierSpline(KVector[] points)
Calculates a closed piecewise bezier spline where the first point is start and end. this function is not fully tested yet!

Parameters:
points - points being passed by the spline
Returns:
piecewise bezier spline

interpolatePoints

public BezierSpline interpolatePoints(KVector[] points)
returns a piecewise bezierspline.

Specified by:
interpolatePoints in interface ISplineInterpolator
Parameters:
points - as an array, see implementing class if to prefer Vector or List implementation.
Returns:
piecewise bezierspline

interpolatePoints

public BezierSpline interpolatePoints(LinkedList<KVector> points)
returns a piecewise bezierspline.

Specified by:
interpolatePoints in interface ISplineInterpolator
Parameters:
points - as an array, see implementing class if to prefer Vector or List implementation.
Returns:
piecewise bezierspline

interpolatePoints

public BezierSpline interpolatePoints(KVector[] points,
                                      KVector startVec,
                                      KVector endVec,
                                      boolean tangendScale)
returns a piecewise bezierspline.

Specified by:
interpolatePoints in interface ISplineInterpolator
Parameters:
points - as an array, see implementing class if to prefer Vector or List implementation.
startVec - tangent vector specifying to head out of the first node
endVec - tangent vector specifying to head into the last node
tangendScale - if true, the tangent is scaled depending on the distance to the next ctr point, if false the tangent is used as passed
Returns:
piecewise bezierspline

interpolatePoints

public BezierSpline interpolatePoints(LinkedList<KVector> points,
                                      KVector startVec,
                                      KVector endVec,
                                      boolean tangendScale)
returns a piecewise bezierspline.

Specified by:
interpolatePoints in interface ISplineInterpolator
Parameters:
points - as an array, see implementing class if to prefer Vector or List implementation.
startVec - tangent vector specifying to head out of the first node
endVec - tangent vector specifying to head into the last node
tangendScale - if true, the tangent is scaled depending on the distance to the next ctr point, if false the tangent is used as passed
Returns:
piecewise bezierspline