Prerequisite: Turtle Programming Basics
Fractals are objects that tend to have self-similar structures repeated a finite number of times. The objective of this article is to draw a star fractal where a star structure is drawn on each corner of the star and this process is repeated until the input size reduces to a value of 10. For achieving this star fractal pattern the turtle module is used.
- forward(value): It moves the turtle in forward direction.
- speed(value): It changes the speed of the turtle.
- penup(): Stop drawing.
- pendown(): Start drawing.
- left(value): It moves the turtle towards the left.
- Import turtle.
- Initialise the turtle.
- Change the background color.
- Make a function to draw a star.
- Call the above function recursively inside the for loop to make the entire start pattern.
Below is the implementation of the above approach.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Python | Plotting Fibonacci spiral fractal using Turtle
- Y Fractal tree in Python using Turtle
- Draw Spiraling Star using Turtle in Python
- Python - Draw Star Using Turtle Graphics
- Draw Colourful Star Pattern in Turtle - Python
- How to draw color filled star in Python-Turtle?
- Fractal using Spirograph in Python
- Printing HELLO with turtle module
- turtle.forward() method in Python-Turtle
- turtle.setpos() and turtle.goto() functions in Python
- Julia fractal in Python
- Fractal Trees in Python
- Mandelbrot Fractal Set visualization in Python
- Python | Print an Inverted Star Pattern
- Why import star in Python is a bad idea
- Python - Star or Asterisk operator ( * )
- What does the Double Star operator mean in Python?
- Program to print half Diamond star pattern
- Draw Circle in Python using Turtle
- Python - Hilbert Curve using turtle
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.