From e2dbc48e5d47da11f73146c18110c60b85a89e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Sun, 21 Apr 2013 16:08:09 +0200 Subject: [PATCH] docstring --- doc/examples/plot_shapes.py | 4 ---- skimage/draw/_draw.pyx | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/examples/plot_shapes.py b/doc/examples/plot_shapes.py index fcb72863..79da99b6 100644 --- a/doc/examples/plot_shapes.py +++ b/doc/examples/plot_shapes.py @@ -56,9 +56,5 @@ img[rr, cc, :] = (0, 0, 255) rr, cc = ellipse_perimeter(120, 400, 60, 20, orientation=math.pi/2.) img[rr, cc, :] = (255, 255, 255) -# bezier curve -rr, cc = bezier_curve(120, 400, 150, 480, 160, 400, weight=2) -img[rr, cc, :] = (255, 255, 255) - plt.imshow(img) plt.show() diff --git a/skimage/draw/_draw.pyx b/skimage/draw/_draw.pyx index 7fb6b55e..9965af21 100644 --- a/skimage/draw/_draw.pyx +++ b/skimage/draw/_draw.pyx @@ -404,7 +404,7 @@ def bezier_curve(Py_ssize_t y0, Py_ssize_t x0, Py_ssize_t y1, Py_ssize_t x1, Py_ssize_t y2, Py_ssize_t x2, double weight): - """Generate a Bezier curve coordinates. + """Generate Bezier curve coordinates. Parameters ---------- @@ -424,6 +424,11 @@ def bezier_curve(Py_ssize_t y0, Py_ssize_t x0, May be used to directly index into an array, e.g. ``img[rr, cc] = 1``. + Notes + ----- + The algorithm is the rational quadratic algorithm presented in + reference [1]. + References ---------- .. [1] A Rasterizing Algorithm for Drawing Curves, A. Zingl, 2012