MCPcopy Index your code
hub / github.com/python/cpython / fractal

Method fractal

Lib/turtledemo/fractalcurves.py:63–73  ·  view source on GitHub ↗
(self, dist, depth, dir)

Source from the content-addressed store, hash-verified

61
62 # p. 146
63 def fractal(self, dist, depth, dir):
64 if depth < 1:
65 self.fd(dist)
66 return
67 self.fractal(dist / 3, depth - 1, dir)
68 self.lt(60 * dir)
69 self.fractal(dist / 3, depth - 1, dir)
70 self.rt(120 * dir)
71 self.fractal(dist / 3, depth - 1, dir)
72 self.lt(60 * dir)
73 self.fractal(dist / 3, depth - 1, dir)
74
75def main():
76 ft = CurvesTurtle()

Callers 1

fractalgonMethod · 0.95

Calls 1

ltMethod · 0.80

Tested by

no test coverage detected