From 9ceb489ba8c92a4a5465723d5c0618ca637624b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Tue, 27 Aug 2013 18:28:32 +0200 Subject: [PATCH] DOC: add bezier_curve --- doc/examples/plot_shapes.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/examples/plot_shapes.py b/doc/examples/plot_shapes.py index 995a278a..197e133b 100644 --- a/doc/examples/plot_shapes.py +++ b/doc/examples/plot_shapes.py @@ -6,6 +6,7 @@ Shapes This example shows how to draw several different shapes: * line +* Bezier curve * polygon * circle * ellipse @@ -16,7 +17,8 @@ import matplotlib.pyplot as plt from skimage.draw import line, polygon, circle, \ circle_perimeter, \ - ellipse, ellipse_perimeter + ellipse, ellipse_perimeter, \ + bezier_curve import math img = np.zeros((500, 500, 3), dtype=np.uint8) @@ -48,6 +50,10 @@ img[rr, cc, 2] = 255 rr, cc = circle_perimeter(120, 400, 15) img[rr, cc, :] = (255, 0, 0) +# Bezier curve +rr, cc = bezier_curve(70, 100, 10, 10, 150, 100, 1) +img[rr, cc, :] = (255, 0, 0) + # ellipses rr, cc = ellipse_perimeter(120, 400, 60, 20, orientation=math.pi / 4.) img[rr, cc, :] = (255, 0, 255)