Question: Task Draw a Spirograph which is a curve that is formed rolling a curve inside or outside of another circle. The trick to drawing such

Task

Draw a Spirograph which is a curve that is formed rolling a curve inside or outside of another circle. The trick to drawing such a curve is to place the pen at any point on the rolling circle. If the radius of the fixed circle is R, the radius of the moving circle is r , and the offset of the pen point is a then the resulting curve is defined by: x = (R+r)*cos(t) - (r+a)*cos(((R+r)/r)*t) y = (R+r)*sin(t) - (r+a)*sin(((R+r)/r)*t) where t is a parameter that ranges from 0 t 100 in small increments (say 0.01)

Input

All Input for the above Task needs to taken as Commandline Arguments. No Input will be taken from the Standard Input Stream. The input consists of three numbers namely R, r, a which presents the following quantities R - Radius of the Larger Circle r - Radius of the smaller Circle a - Offset of the pen point in the moving circle

Output

java Spirograph 180 40 15 results in the following output:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!