i am writing a program that draws the arcs produced by rotating one coin around another.
given the diameters of the coins can someone provide the sine/cosine functions in polar coordinates i would need?

i am writing a program that draws the arcs produced by rotating one coin around another.
given the diameters of the coins can someone provide the sine/cosine functions in polar coordinates i would need?
I could be wrong and someone correct me if I am but maybe you should check parametric equations. Where the curves of x/y can vary around or by a parameter. One example shows a circle inside a larger circle and the path that a point on the small circle traces out as it rotates inside of the larger circle. I dont see an equation but it is called a Hypocycloid of four cusps.
http://en.wikipedia.org/wiki/Hypocycloid
^Has some good info and should help but honestly I dont know enough about the equations to know if they hold for a circle transversing around the outside. Thats pretty neat stuff though, good luck.
This is probably what you want for a coin rolling on the outside of another.
http://en.wikipedia.org/wiki/Epitrochoid
Wow I remember all those shapes from growing up and owning a spirograph, lol. Those were fun.
Without giving you all the answers to your homework think about it,
x=x_axis_origin
y=y_axis_origin
for t = 0 to 360$
x1=x+ sin(t)*large_coin_radius
y1=y+ cos(t)*large_coin_radius
x2=x1+ sin(t*ratio_of_radius)*small_coin_radius + small_coin_radius
y2=y1+ cos(t*ratio_of_radius)*small_coin_radius + small)_coin_radius
plot X1,Y1. or line (x1,y1)
Next t
$ assumes degrees but it's usually in radians ie pi/180 rathre than 360.
I know it can be more elegant but the code above should be easier to read.
Here's a working VB example:
You'll need to tweak the values as required...
Private Sub Command1_Click()
x = 3700
y = 3700
For t = 0 To 180 / 3.14159 Step 0.001
X1 = x + Sin(t) * 2400
Y1 = y + Cos(t) * 2400
X2 = X1 + Sin(t * 8 ) * 200 '
Y2 = Y1 + Cos(t * 8 ) * 200
If t = 0 Then Picture1.PSet (X2, Y2)
Picture1.Line (X2, Y2)
Next t
End Sub
thanks guys. the equation for the epicycloid is what i needed.
« Good calculus book?  Math sutdies » 