Epicycloid is a plane curve produced by tracing the path of a chosen point of a circle (called epicycle) which rolls without slipping around a fixed circle. It is a particular kind of curve.
If the smaller circle has radius r, and the larger circle has radius R = kr, then the parametric equations for the Epicycloid can be given by either:
If k is an integer, then the curve is closed, and has k cusps, if k is a rational number (k=p/q), then the curve has p cusps, if k is an irrational number, then the curve never closes, and fills the space between the larger circle and a circle of radius R + 2r.
You can plot function online using the folowing script for Epicycloid: