function
Planning.Bezier.evaluateDerivative
Evaluate a physical-time derivative of a Bezier curve
Forms the derivative control polygon and evaluates it with the same De Casteljau implementation used for the original curve.
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | controlPoint | Real | [:, :] | One control point per column |
| input | duration | Real | (unit = "s") | Curve duration |
| input | t | Real | (unit = "s") | Time relative to the segment start |
| input | derivativeOrder | Integer | (min = 0) = 1 | Derivative order |
| output | value | Real | [size(controlPoint, 1)] | Derivative value at t |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function evaluateDerivative
"Evaluate a physical-time derivative of a Bezier curve"
input Real controlPoint[:, :] "One control point per column";
input Real duration(unit = "s") "Curve duration";
input Real t(unit = "s") "Time relative to the segment start";
input Integer derivativeOrder(min = 0) = 1 "Derivative order";
output Real value[size(controlPoint, 1)] "Derivative value at t";
protected
Real derivativePoint[
size(controlPoint, 1), size(controlPoint, 2) - derivativeOrder];
algorithm
derivativePoint := Planning.Bezier.derivativeControlPoints(
controlPoint, duration, derivativeOrder);
value := Planning.Bezier.evaluate(derivativePoint, duration, t);
annotation(Documentation(info="<html>
<p>Forms the derivative control polygon and evaluates it with the same
De Casteljau implementation used for the original curve.</p>
</html>"));
end evaluateDerivative;