Skip to content

Commit bc8a558

Browse files
authored
Update koch curve.py
1 parent 090f132 commit bc8a558

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Koch Curve/koch curve.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
def snowflake(lengthSide, levels):
77
if levels == 0:
88
forward(lengthSide)
9-
return
9+
return #if the levels became zero then stop returning
10+
#to use the length side by 1/3rd of the previous
11+
#length since we are trisecting the line (koch curve logics to create the fractal)
1012
lengthSide /= 3.0
1113
snowflake(lengthSide, levels-1)
1214
left(60)

0 commit comments

Comments
 (0)