Logo Search packages:      
Sourcecode: inkscape version File versions

Piecewise< SBasis > Geom::curvature ( Piecewise< D2< SBasis > > const &  V,
double  tol 
)

returns a function giving the curvature at each point in M.

Parameters:
M the Element.
tol the maximum error allowed.
Todo: claimed incomplete. Check.

Definition at line 379 of file sbasis-geometric.cpp.

References Geom::Piecewise< T >::concat(), curvature(), Geom::Piecewise< T >::cuts, Geom::Piecewise< T >::segs, Geom::Piecewise< T >::setDomain(), and Geom::Piecewise< T >::size().

                                                          {
    Piecewise<SBasis> result;
    Piecewise<D2<SBasis> > VV = cutAtRoots(V);
    result.cuts.push_back(VV.cuts.front());
    for (unsigned i=0; i<VV.size(); i++){
        Piecewise<SBasis> curv_seg;
        curv_seg = curvature(VV.segs[i],tol);
        curv_seg.setDomain(Interval(VV.cuts[i],VV.cuts[i+1]));
        result.concat(curv_seg);
    }
    return result;
}


Generated by  Doxygen 1.6.0   Back to index