13 #ifndef eli_geom_curve_curvature_hpp
14 #define eli_geom_curve_curvature_hpp
16 #include "eli/code_eli.hpp"
24 template<
typename curve__>
25 void curvature(
typename curve__::data_type &rho,
const curve__ &c,
const typename curve__::data_type &t)
30 typename curve__::point_type xp(c.fp(t)), xpp(c.fpp(t));
32 if (xp.innerSize()==2)
34 typename curve__::data_type tmp1(std::abs(xp(0)*xpp(1)-xp(1)*xpp(0))), tmp2(xp.norm());
36 rho=tmp1/(tmp2*tmp2*tmp2);
40 typename curve__::point_type tmp1;
41 typename curve__::data_type tmp2(xp.norm());
43 tmp1 << (xp(1)*xpp(2)-xp(2)*xpp(1)), (xp(2)*xpp(0)-xp(0)*xpp(2)), (xp(0)*xpp(1)-xp(1)*xpp(0));
44 rho=tmp1.norm()/(tmp2*tmp2*tmp2);
void curvature(typename curve__::data_type &rho, const curve__ &c, const typename curve__::data_type &t)
Definition: curvature.hpp:25