(self, dist, depth, dir)
| 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 | |
| 75 | def main(): |
| 76 | ft = CurvesTurtle() |