Question: Spirographs. Write a program that takes three double command-line arguments R, r, and a and draws the resulting spirograph. A spirograph (technically, an epicycloid) is

Spirographs. Write a program that takes three double command-line arguments R, r, and a and draws the resulting spirograph. A spirograph (technically, an epicycloid) is a curve formed by rolling a circle of radius r around a larger fixed circle of radius R. If the pen offset from the center of the rolling circle is (ra), then the equation of the resulting curve at time t is given byx(t) = (R+r) cos (t) - (r+a) cos ((R+ r)t/r) y(t) =

Such curves were popularized by a best-selling toy that contains discs with gear teeth on the edges and small holes that you could put a pen in to trace spirographs.

x(t) = (R+r) cos (t) - (r+a) cos ((R+ r)t/r) y(t) = (R+r) sin (t) - (r+a) sin ((R + r)t/r)

Step by Step Solution

3.44 Rating (144 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on the formula provided in the image which defines the xt and yt coordinates for a spirograph I will help you create a program in Python that ta... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction To Programming Questions!