Spirograph 2
Last updated
Last updated
We have thus far built a fairly good approximation of the Spirograph set. However, let’s extend the hypocycloid program to model the Spirograph more accurately and generate further interesting results. As the drawing below shows, a spirograph disc has many holes in which to insert the pen nib. Each hole lies a distance h from the centre of the disc. Let’s introduce this new parameter h into our program.
The parametric equation for a hypotrochoid through the origin is:
Note in this case the inclusion of h parameter. We simply modify the expressions used in the earlier hypocyloid example to plot the new curve.
The program is further extended to vary the visual attributes (colour) of the curve as we trace the point on the disc through its revolution. This is achieved by exploding the polyline into segments that are then given individualised RGB colours.
We now have a hypotrochoid drawing program that can produce some results that are not physically possible with the original spirograph set. It has several input parameters (highlighted in magenta) that we can adjust to quickly explore variations of the curve.
What is the result of increasing N, the factor by which we multiply Pi i.e. the number of times we revolve the smaller circle around the larger one?
What are combinations of a, b and h values that produce unexpected results (perhaps visually coherent)? For example, what happens when a is a multiple of b? Take note of these combinations.
There are another set of curves called Epicycloids, which are generated by tracing a fixed point on a circle that rolls on the outside (not inside) of another circle. Look up the parametric equation of an epicycloid, try to work out its derivation. Thereafter, adapt one of our earlier definitions to generate an Epicyloid
Nesting – thus far we have nested one circle C2 inside a larger one C1 to generate the hypocycloid. Are you able to nest another smaller circle C3 inside C2? What about another? How far can you go? What problems do you face in trying to implement a solution?
In this exercise, we demonstrate the ease with which we can begin to graph curves that are mathematically defined, and thereafter begin to compose different expressions to generate curves that were unanticipated.
A curve generated by tracing a fixed point offset from the centre of a smaller circle rolling inside a larger circle is called a hypotrochoid. In fact, the hypocycloid is a special case of a hypotrochoid whereby , the radius of the disc. If we introduce the parameter and moreover, remove the constraint of containing the fixed point within the smaller circle, we are able to generate curves such as the one shown below, where .