Skip to content

Commit 5e06aed

Browse files
author
Tom Jund
committed
Add Gosper curve fractal implementation
1 parent ab3aab5 commit 5e06aed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fractals/gosper_curve.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ def draw_gosper_curve(
1818
depth: The recursive depth of the curve.
1919
direction: The direction of the drawing (1 or -1).
2020
angle: The angle of the turns in degrees.
21+
22+
Example:
23+
>>> import turtle
24+
>>> draw_gosper_curve(side_length=200.0, depth=4, direction=-1, angle=60.0) # doctest: +SKIP
2125
"""
26+
2227
if depth == 0:
2328
turtle.forward(side_length)
2429
else:

0 commit comments

Comments
 (0)