Constructor with constraints. This constructor will add 4 points (2 after the first one, 2 before the last one) to ensure that velocity and acceleration constraints are respected.
isApprox check if other and *this are approximately equals. Only two curves of the same class can be approximately equals, for comparison between different type of curves see isEquivalent
Compute the primitive of the curve at order N. Computes the primitive at order N of bezier curve of parametric equation .
At order , the primitve of is such as .
Computes a Bezier curve of order degrees higher than the current curve, but strictly equivalent. Order elevation is required for addition / substraction and other comparison operations.
Elevate the Bezier curve of order degrees higher than the current curve, but strictly equivalent. Order elevation is required for addition / substraction and other comparison operations.
Evaluate the derivative order N of curve at time t. If derivative is to be evaluated several times, it is rather recommended to compute derived curve using compute_derivate.
Evaluate all Bernstein polynomes for a certain degree. A bezier curve with N control points is represented by : with .
Warning: the horner scheme is about 100 times faster than this method.
This method will probably be removed in the future as the computation of bernstein polynomial is very costly.
Evaluate the curve value at time t using deCasteljau algorithm. The algorithm will compute the centroids of parameters of consecutive control points of bezier curve, and perform it iteratively until getting one point in the list which will be the evaluation of bezier curve at time .
Compute de Casteljau's reduction of the given list of points at time t. For the list of N points, compute a new list of points of size N-1 :
with t the time when to evaluate bezier curve.
\ The new list contains centroid of parameters of consecutive points in the list.
Compute the cross product of the current bezier curve by another bezier curve. The cross product p1Xp2 of 2 bezier curves p1 and p2 is defined such that forall t, p1Xp2(t) = p1(t) X p2(t), with X designing the cross product. This method of course only makes sense for dimension 3 curves. It assumes that a method point_t cross(const point_t&, const point_t&) has been defined.
Compute the cross product of the current bezier b by a point point. The cross product pXpoint of is defined such that forall t, bXpoint(t) = b(t) X point, with X designing the cross product. This method of course only makes sense for dimension 3 polynomials.
Constructor with constraints. This constructor will add 4 points (2 after the first one, 2 before the last one) to ensure that velocity and acceleration constraints are respected.
Parameters
PointsBegin
: an iterator pointing to the first element of a control point container.
PointsEnd
: an iterator pointing to the last element of a control point container.
constraints
: constraints applying on start / end velocities and acceleration.
T_min
: lower bound of time, curve will be defined for time in [T_min, T_max].
T_max
: upper bound of time, curve will be defined for time in [T_min, T_max].
Compute the primitive of the curve at order N. Computes the primitive at order N of bezier curve of parametric equation .
At order , the primitve of is such as .
Parameters
order
: order of the primitive.
init
: constant valuefor the first point of the primitive (can tipycally be zero)
Evaluate the derivative order N of curve at time t. If derivative is to be evaluated several times, it is rather recommended to compute derived curve using compute_derivate.
Parameters
order
: order of derivative.
t
: time when to evaluate the curve.
Returns
point corresponding on derived curve of order N at time t.
Computes a Bezier curve of order degrees higher than the current curve, but strictly equivalent. Order elevation is required for addition / substraction and other comparison operations.
Elevate the Bezier curve of order degrees higher than the current curve, but strictly equivalent. Order elevation is required for addition / substraction and other comparison operations.
Evaluate all Bernstein polynomes for a certain degree. A bezier curve with N control points is represented by : with .
Warning: the horner scheme is about 100 times faster than this method.
This method will probably be removed in the future as the computation of bernstein polynomial is very costly.
isApprox check if other and *this are approximately equals. Only two curves of the same class can be approximately equals, for comparison between different type of curves see isEquivalent
Parameters
other
the other curve to check
prec
the precision threshold, default Eigen::NumTraits<Numeric>::dummy_precision()