Wolfram Function Repository
Instantuse addon functions for the Wolfram Language
Function Repository Resource:
Plot a spirograph
ResourceFunction["Spirograph"][f,φ] plots a spirograph for function f with variable φ. 

ResourceFunction["Spirograph"][f,φ,φ_{f}] plots a spirograph from 0 to φ_{f}. 
Plot a spirograph:
In[1]:= 

Out[1]= 

A more complicated spirograph:
In[2]:= 

Out[2]= 

Half of the path of the spirograph:
In[3]:= 

Out[3]= 

Convert the curve to a polygon:
In[4]:= 

Out[4]= 

Spirographs with random values:
In[5]:= 

Out[5]= 

Set explicit values for “MaurerPolygons”:
In[7]:= 

Out[7]= 

Default values for “MaurerPolygons”:
In[8]:= 

Out[8]= 

Show the “wheels” that generate the spirograph:
In[9]:= 

Out[9]= 

Make an animation:
In[10]:= 

Out[10]= 

Spirographs had an important application in the 1940s, when they were used for the "manual" solution of polynomial equations of higher degree. To understand this, consider the following polynomial poly in the variable z:
In[11]:= 

Out[11]= 

Replace the variable z by its polar form, r ⅇ^{ⅈ φ }, where r and φ are the absolute value and phase or argument of z:
In[12]:= 

Out[12]= 

Show the spirographs for a range of values of r:
In[13]:= 

Out[13]= 

Zoom to a neighborhood of the origin:
In[14]:= 

Out[14]= 

Here is an even closer look:
In[15]:= 

Out[15]= 

These are absolute values and arguments of the zeros of the polynomial:
In[16]:= 

Out[16]= 

The spirograph curves corresponding to these absolute values all go through the origin:
In[17]:= 

Out[17]= 

An analog circuit was used to vary r and the corresponding spirographs were monitored using an oscilloscope. Further analysis to determine φ led to approximations of the zeros of the polynomial.
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License