docstring

This commit is contained in:
François Boulogne
2013-04-21 16:08:09 +02:00
parent 00524a3d86
commit e2dbc48e5d
2 changed files with 6 additions and 5 deletions
-4
View File
@@ -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()
+6 -1
View File
@@ -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