Create an infinite fractal
Private research annotation
Sign in to add a private research label or note.
- User
Create an infinite fractal
Assistant
Here is some Python code to generate an infinite fractal using recursion:
pythonimport turtle def draw_fractal(length, level): if level > 0: turtle.forward(length) turtle.left(60) draw_fractal(length/3, level-1) turtle.right(120) draw_fractal(length/3, level-1) turtle.left(60) turtle.backward(length) turtle.speed(0) turtle.penup() turtle.goto(-200, -100) turtle.pendown() draw_fractal(400, 5) turtle.done()This recursively draws a fractal pattern by dividing the line length by 3 and drawing additional lines at 60 degree angles. The level parameter controls the recursion depth.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.