Spirograph™ is a geometric drawing device that produces mathematical roulettes.
In 1827, Peter Desvignes developed the "Speiragraph", a device to create elaborate spiral drawings. In the 20th Century this became a popular children's toy, the Spirograph™. In addition to creating drawings, practical uses include creating patterns on banknotes that make it much more difficult to accurately create forgeries.
Write a program that draws a roulette using the number of turns in the circle, the number of sides and length of a side in the shape.
Use this boilerplate code as a starting point:
Remember to add a comment before a subprogram, condition or iteration to explain its purpose.
spiro(20, 50, 6)
Use these resources as a reference to help you meet the success criteria.
Check that your program outputs the expected result and has met the success criteria.
spiro(20, 50, 6)
spiro(8, 50, 3)
spiro(3, 50, 5)
Check that you have: