Spirograph is a geometric drawing toy that produces mathematical roulette curves of the variety technically known as hypotrochoids and epitrochoids. It was developed by British engineer Denys Fisher and first sold in 1965.
The name has been a registered trademark of Hasbro Inc. since 1998 following purchase of the company that had acquired the Denys Fisher company. The Spirograph brand was relaunched worldwide with original product configurations in 2013 by Kahootz Toys.
Spirograph can be used to draw various fractals. Some of them are given below
You can visit benice-equation-blogspot.in for more fractals design with there parametric equation. Some of them are given below
Mathematics behind the curtain
These are the two parametric equation to form a spirograph fractals, to understand these equations you have to consider a generalized figure of spirograph.
For the mathematics part you can refer to Wiki although i’ll try to explain a little of that mathematics in a short here. If we are interested behind the maths then you can check out the referred links. So as of now, these various curve can be drawn by using a parametric equation and varying some values of that equation we can get different fractals. So here’s the parametric equation:
R is a scaling parameter and does not affect the structure of the Spirograph.
So, now let’s try to implement this in code.
The above program draws 4 different kinds of spirograph fractals, try to generate other fractals and then upload your github links in the comment. I’ll be happy to help you out if any error comes up.
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.
- Snowflakes Fractal using Python
- Fractal Trees in Python
- Julia fractal in Python
- Mandelbrot Fractal Set visualization in Python
- Python | Plotting Fibonacci spiral fractal using Turtle
- Reading Python File-Like Objects from C | Python
- Important differences between Python 2.x and Python 3.x with examples
- Python | Set 4 (Dictionary, Keywords in Python)
- Python | Sort Python Dictionaries by Key or Value
- Python | Add Logging to a Python Script
- Python | Add Logging to Python Libraries
- chr() in Python
- Python Set | pop()
- zip() in Python