1. 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?  2. ### Related Discussions:

3. 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.  4. 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.  x=x_axis_origin
y=y_axis_origin

for t = 0 to 360\$
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  6. thanks guys. the equation for the epicycloid is what i needed.  Bookmarks
 Posting Permissions
 You may not post new threads You may not post replies You may not post attachments You may not edit your posts   BB code is On Smilies are On [IMG] code is On [VIDEO] code is On HTML code is Off Trackbacks are Off Pingbacks are Off Refbacks are On Terms of Use Agreement