The epicycloid is the path traced by a point on the edge of a circle as it rolls without slipping along the edge of another circle. The two circles are not required to be the same size:
,,.onOK@@@HQme.,,
,,.szF'``         ``'Tux.,,
,zZ'``                   ``'Cc,
,xX``                           ``Ww,
.uU`                                 `Nn.
dy`                                     `qb
/7                                         VA
4y                                           \D,
,I'                                            `U,
dp                                              qb
,j'                                              `t,
AV                                                VA
AV                                   R1           VA
|69                       .________________________96|
VA                                                AV
VA                                                AV
`t,                                              ,j'
qb                                              dp
`I,                                            ,U'
\D                                           4y
VA                                         /7
qb                                       dy
`Nn.                                 .uU`
`Ww,,                           ,,xX`
'Cc.,,                   ,,.zZ`
``'Tux.,,         ,,.szF'``
``'TTOK@@@HQTT'``
,,.onOK@@@@@HQme.,,
,.szF'``           ``'Tux.,
,z'`                       `'c,
,x'`                           `'w,
.u'`                               `'n.
dy                                     qb
/7                                       VA
4y                                         \D
,I'                                          `U,
dp                                            qb
,j'                                            `t,
AV                                  R2          VA
69                      ._______________________96
VA                                              AV
`t,                                            ,j'
qb                                            dp
`I,                                          ,U'
\D                                         4Y
VA                                       /7
qb                                     dy
`'n.                               .u'`
`'w,                           ,x'`
`'c,                       ,z'`
`'Tux.,,           ,,.szF'`
``'TTOK@@@@@HQTT'``
With the above setup, let t be the angle that circle 1 (having radius R1) has rotated around circle 2 (radius R2). Then the parametric equations for the path a point on the edge of circle 1 traces is:
x=(R1+R2)*cos(t*R1/R2)-R1*cos(t)
y=(R1+R2)*sin(t*R1/R2)-R1*sin(t)
Note that, if R1=R2, then the shape is a cardioid. (In the above setup, I used R1=25chars, R2=24chars.)

ii
rS2;7aZ0ZS:8W2W0a@aWZiXSXX
2Si    :                :.   .Xa:
XX,  r0MBSS2Z8SS2    XZSX2aSS2WMZ   rr
7rr;:XM:           0M8M;           2M:rrBr:
7Mrr  ri          227     Za;          r   7aB.
2Mi   ,a          a;     i     S;         rX    aM
,M.    8          S:       ,       2          Z     SZ
a0     B ;aSa0aXr2M;XS.     ;     X27XM;XXa0SaX 8     ;Wi
7iS    rZB,        Z    ;aS:     ZSr    ,,        XMr    .X0
8 W   2X Z         M        .8  rS        M          Z.Z:   ,Z
Z 0  aS  0         .X          0M           W         0  :Z, M 2
@  ;ri    W         S            r           W         :a   .X a 0
2  M;     Xr         X            .           8          M     .M  M
W  M      0.   Xa0SXZrM           ;           M28S0ZX;   0      ;M ;i
B :.M       0i2S       ,           .          .       :aS M       WX @
M rZ       rM                      r                     S2:      8 ; 2
; W 0     W; Z                      .                     0  a;    W X 8
Z:  :2  :8    W                     ;                    S;   :a   W  a2
2M   M ai     .a                    :                   ;X      W  a  ,M
M    Z ;        Z                   .                  Xi        ;a    M
... @  .  M  .  ...  :2M. .,........ .. 7 ,,.  ...,,... XBX  ....... aZ ., M  ..
M    X2          X:                 .                :7;         82    M
88   M @       Zi                   ;                   S.      W Zi   M
2Z  ;X  0     8                     .                    0     X,  B  B2
X Z B    Xr  Xr                     i                     W   Z.   W  7Z
r7 8      Z Z                      ,                     r 7X     B B 0
M Z0       ;M                      i                    .,M       87 S,
X  ZM      Z  XaaZi  7rM           ,          S8r.  aZX8: 8       M  0
@  M      2i      00  7           ;           0 i07      W      M, B
8  0i     W         8                        W          M     aa ii
:S M Z    W         7,          .M           W         Z    Xir  Z
ir , ia, .X         M         :X;7         ,7         8  X2  X X
8r.  iX;M         ir       2:   SS       M         aS7S   BX,
SZ     rMrS       r.  Sa27   i   aS2.  8       XXM2     2a
,M;     a iZX288ZraM:       .      ,0Mra80SS07 .:     Ma
aM     W          0       r      S.         SX    rM
0@.   ;X         ra:         a0         .Z    XM
8XXX  ;          .;7    7X,          ;, :7r0;
,7. 7;8M7i,     ri;SMZMii;     .:7BMXi7:;X
.XX:   aZ0;iii         .:;ii28S:   7X.
72Xi  ii;            i::  .SSS
;XS:SZMMMM2MM@MM02irZ7

Parametric Cartesian equation: x = (a + b)cos(t) - bcos((a/b + 1)t), y = (a + b)sin(t) - bsin((a/b + 1)t)

There are four curves which are closely related. These are the epicycloid, the epitrochoid, the hypocycloid and the hypotrochoid and they are traced by a point P on a circle of radius b which rolls round a fixed circle of radius a.

For the epicycloid, shown above in clarity-reducing ASCII, the circle of radius b rolls on the outside of the circle of radius a. The point P is on the circumference of the circle of radius b. For the example drawn here a = 8 and b = 5.

Special cases

• a = b, a cardioid is obtained
• a = 2b, a nephroid is obtained
• a = (n - 1)b where n is an integer, then the length of the epicycloid is 8nb and its area is b2(n2 + n)
Also, the evolute of an epicycloid is a similar epicycloid.

Ep`i*cy"cloid (?), n. [Epicycle + -oid: cf. F. 'epicycloide.] Geom.

A curve traced by a point in the circumference of a circle which rolls on the convex side of a fixed circle.

⇒ Any point rigidly connected with the rolling circle, but not in its circumference, traces a curve called an epitrochoid. The curve traced by a point in the circumference of the rolling circle when it rolls on the concave side of a fixed circle is called a hypocycloid; the curve traced by a point rigidly connected with the rolling circle in this case, but not its circumference, is called a hypotrochoid. All the curves mentioned above belong to the class class called roulettes or trochoids. See Trochoid.