Hi, guys,
During the implementation of a Bezier curve, user want to get the
first derivative value at some position on the curve.
I know the Bezier equation, and using mathematic methods I can compute
the value easily.
But how did I put down the method into C code?
For example, I want to get the first derivative value at position t1
for a cubic Bezier curve (single float).
What I need to do is
1. Get the position value p1 at t1.
2. Get the position value p2 at (t1+0.000001).
3. Compute the derivative (p2-p1)/0.00001. Then normalize the value.
The value is the first derivative at position t1.
Right? Any problem? Precision is OK?
Thanks.