Commit a1d9c6f5 authored by Steve Tonneau's avatar Steve Tonneau
Browse files

added python bindings for derivative

parent 3005c737
......@@ -159,6 +159,8 @@ BOOST_PYTHON_MODULE(spline)
.def("min", &bezier_t::min)
.def("max", &bezier_t::max)
.def("__call__", &bezier_t::operator())
.def("derivate", &bezier_t::derivate)
.def("compute_derivate", &bezier_t::compute_derivate)
;
/** END bezier curve**/
......
......@@ -11,6 +11,10 @@ a = bezier(waypoints, -1., 3.)
a.min()
a.max()
a(0.4)
assert((a.derivate(0.4,0) == a(0.4)).all())
a.derivate(0.4,2)
a = a.compute_derivate(100)
#testing spline function
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment