Skip to content

Commit a6aace5

Browse files
author
Onur Rauf Bingol
committed
Update Curve.derivatives() docstring
1 parent c641e01 commit a6aace5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

geomdl/BSpline.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,19 @@ def evaluate_list(self, param_list):
199199
def derivatives(self, u, order=0, **kwargs):
200200
""" Evaluates n-th order curve derivatives at the given parameter value.
201201
202+
The output of this method is list of n-th order derivatives. If ``order`` is ``0``, then it will only output
203+
the evaluated point. Similarly, if ``order`` is ``2``, then it will output the evaluated point, 1st derivative
204+
and the 2nd derivative. For instance;
205+
206+
.. code-block:: python
207+
208+
# Assuming a curve (crv) is defined on a parametric domain [0.0, 1.0]
209+
# Let's take the curve derivative at the parametric position u = 0.35
210+
ders = crv.derivatives(u=0.35, order=2)
211+
ders[0] # evaluated point, equal to crv.evaluate_single(0.35)
212+
ders[1] # 1st derivative at u = 0.35
213+
ders[2] @ 2nd derivative at u = 0.35
214+
202215
:param u: parameter value
203216
:type u: float
204217
:param order: derivative order

0 commit comments

Comments
 (0)