To create Snowflake fractals using Python programming
What are fractals
A fractal is a never-ending pattern. Fractals are infinitely complex patterns that are self-similar across different scales. They are created by repeating a simple process over and over in an ongoing feedback loop. Driven by recursion, fractals are images of dynamic systems – the pictures of Chaos.
What is turtle programming in python??
Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzig and Seymour Papert in 1966.
Imagine a robotic turtle starting at (0, 0) in the x-y plane. After an import turtle, give it the command turtle.forward(15), and it moves (on-screen!) 15 pixels in the direction it is facing, drawing a line as it moves. Give it the command turtle.right(25), and it rotates in-place 25 degrees clockwise.
By combining together these and similar commands, intricate shapes and pictures can easily be drawn.
The turtle module is an extended reimplementation of the same-named module from the Python standard distribution up to version Python 2.5.
It tries to keep the merits of the old turtle module and to be (nearly) 100% compatible with it. This means in the first place to enable the learning programmer to use all the commands, classes and methods interactively when using the module from within IDLE run with the -n switch.
The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support.
This Python Code allow you to create Snowflakes design by using its standard library Turtle for GUI designing. This code creates 20 (you can change it in the source code) snowflakes randomly of random size and color in random position of the screeen.
This article is contributed by Subhajit Saha. 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 write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Fractal using Spirograph in Python
- Creating Butterfly themed Fractal in C++ Using Graphics
- Julia fractal in Python
- Fractal Trees in Python
- Mandelbrot Fractal Set visualization in Python
- Rendering a Triangle using OpenGL(using Shaders)
- Heighway's Dragon Curve using Python
- Sum 2D array in Python using map() function
- Print a pattern without using any loop
- Creating a Rainbow using Graphics Programming in C
- Scan-line Polygon filling using OPENGL in C
- Neighbors of a point on a circle using Bresenham's algorithm
- Sierpinski Triangle using Graphics
- Align Cars Using Minimum Cost
- Create n-child process from same parent process using fork() in C
- JSwing | Create a Magnifying tool using Java Robot
- PHP | Get PHP configuration information using phpinfo()
- Largest of two distinct numbers without using any conditional statements or operators
- Flood fill algorithm using C graphics
- Draw a moving car using computer graphics programming in C