The mathematics of the epicycloid