Commit 7d356718 by JasonChmn

### Documentation cubic hermite spline done

parent 90861652
Pipeline #4393 passed with stage
in 2 minutes and 17 seconds
 ... ... @@ -232,13 +232,14 @@ struct bezier_curve : public curve_abc } /// \brief Evaluate all Bernstein polynomes for a certain degree using Horner's scheme. /// For a polynom of degree N expressed by : \f$x(t) = a_0 + a_1t + a_2t^2 + ... + a_nt^n\f$ /// A bezier curve with N control points is expressed as : \f$x(t) = \sum_{i=0}^{N} B_i^N(t) P_i\f$. /// To evaluate the position on curve at time t,we can apply the Horner's scheme : /// \f$x(t) = (1-t)^N(\sum_{i=0}^{N} \binom{N}{i} \frac{1-t}{t}^i P_i) \f$. /// Horner's scheme : for a polynom of degree N expressed by : /// \f$x(t) = a_0 + a_1t + a_2t^2 + ... + a_nt^n\f$ /// where \f$number of additions = N\f$ / f$number of multiplication = N!\f$ /// Using Horner's method, the polynom is transformed into : /// \f$x(t) = a_0 + t(a_1 + t(a_2+t(...))\f$ /// where number of additions = N / number of multiplication = N. /// A bezier curve with N control points is expressed as : \f$x(t) = \sum_{i=0}^{N} B_i^N(t) P_i\f$ /// We can apply the Horner's scheme : \f$x(t) = (1-t)^N(\sum_{i=0}^{N} \binom{N}{i} \frac{1-t}{t}^i P_i) \f$ /// \f$x(t) = a_0 + t(a_1 + t(a_2+t(...))\f$ with N additions and multiplications. /// \param t : unNormalized time /// \return \f$x(t)\f$, point corresponding on curve at time t. /// ... ...
 ... ... @@ -15,12 +15,12 @@ namespace curves { /// \class CubicHermiteSpline. /// \brief Represents a set of cubic hermite splines defining a continuous function \f$x(t)\f$. /// \brief Represents a set of cubic hermite splines defining a continuous function \f$p(t)\f$. /// A hermite cubic spline is a minimal degree polynom interpolating a function in two /// points \f$P_i\f$ and \f$P_{i+1}\f$ with its tangent \f$m_i\f$ and \f$m_{i+1}\f$. /// points \f$P_i\f$ and \f$P_{i+1}\f$ with its tangent \f$m_i\f$ and \f$m_{i+1}\f$.
/// A hermite cubic spline : /// - crosses each of the waypoint given in its initialization (\f$P_0\f$, \f$P_1\f$,...,\f$P_N\f$). /// - has its derivate on \f$P_i\f$ and \f$P_{i+1}\f$ are \f$x'(t_{P_i}) = m_i\f$ and \f$x'(t_{P_{i+1}}) = m_{i+1}\f$. /// - has its derivatives on \f$P_i\f$ and \f$P_{i+1}\f$ are \f$p'(t_{P_i}) = m_i\f$ and \f$p'(t_{P_{i+1}}) = m_{i+1}\f$. /// template ... ... @@ -30,24 +30,34 @@ template struct cubic_hermite_spline : public curve_abc { typedef int Index; typedef std::vector
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!