You are going to create a Spirograph. To do this you will first need the equations that govern the location of the pen in a Spirograph. These are
x = (R+r)*cos(t) - (r+O)*cos(((R+r)/r)*t)
y = (R+r)*sin(t) - (r+O)*sin(((R+r)/r)*t)
where
R is the radius of the outer (fixed) circle,
r is the radius of the rotating (inner) circle, and
O is the offset of the pen from the center of the inner circle.
Since a pen moves the Spirograph, t is a variable that starts at 0 and increases (you can test different increments) to give the x and y location of the pen.
Increasing t will eventually start drawing extending the same line that was previously drawn.
You should have a single button to start the Spirograph drawing. You can either have the program use valid random numbers for R, r, and O - or you can have them entered in text boxes by the user. If you have the user enter these numbers, be sure to seed the text box and indicate and validate acceptable ranges of values for R, r, and O.
Please send in HTML, must be able to work in Wordpress pages
I have the basic working code ready: [login to view URL]
1. The Spirograph is plotted onto an svg element, for better quality and lower plot time.
2. Supports user input, with a checker function, although not fully functioning.
$10 USD en 0 día
0,0 (0 comentarios)
0,0
0,0
2 freelancers están ofertando un promedio de $33 USD por este trabajo
Dear Sir. We claim to get it done perfectly for you EXACTLY in the way you want it - Kindly give we a chance and we will prove myself -
Ready to prove our words, let's get it done right away and I mean RIGHT AWAY !!
Looking forward to hear from you soon - GOD Bless You.