| 
      
      
      From: Maximilian A. <Anh...@gm...> - 2008-05-18 14:20:43
      
     | 
| Hi,
shouldn't valueAndDerivatives() and derivative() do a similar job? The 
following two pieces of code [1] behave very differently for me:
     std::vector<Point> valDer = pwd2.valueAndDerivatives(t0, 2);
     deriv = valDer[1];
and
    deriv = derivative(pwd2).valueAt(t0)
I ran into this when writing an LPE that draws the tangent to a curve. 
In both cases, after the computation 'deriv' should contain the 
direction of the tangent, shouldn't it? With the first version, this was 
not true. The second version worked fine, however. What's the difference 
between the two?
Max
[1] Here, pwd2 is of type Piecewise<D2<SBasis> > and t0 is a double 
indicating a location on the curve.
 |