In this blog post we will create a **spirograph** using Python Turtle to draw different types of curves.

#### Did you know?

A

**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.

Examples of patterns created using a spirograph:

**hypotrochoid**is a type of curve traced by a point attached to a circle of radius

*r*rolling around the inside of a fixed circle of radius

*R*, where the point is a distance

*d*from the center of the interior circle.

The parametric equations for a hypotrochoid are:

Where θ (theta) is the angle formed by the horizontal and the center of the rolling circle.

Source: *https://en.wikipedia.org/wiki/Hypotrochoid*

You can tweak the Python code provided below to change the three key parameters: *R*, *r* and *d* to see their impacts on the hypotrochoid curve.

*(https://en.wikipedia.org/wiki/Hypocycloid)*and adapt the Python code (see below) to create your own Hypocycloid curves.

The parametric equations for a hypocycloid are:

*(https://en.wikipedia.org/wiki/Epicycloid)*and adapt the Python code (see below) to create your own Epicycloid curves.

The parametric equations for an epicycloid are:

*(https://en.wikipedia.org/wiki/Epitrochoid)*and adapt the Python code (see below) to create your own Epitrochoid curves.

The parametric equations for an epitrochoid are:

Find out the properties of a Cycloid *(https://en.wikipedia.org/wiki/Cycloid)* and adapt the Python code (see below) to create your own Cycloid curves.

#### Python Turtle Spirograph: (Hypotrochoid)

#### Spirograph Pattern:

By changing some of the parameters (r, R or d) and the number of iterations (steps) we can create more advanced patterns.