The coaster maker

This coasters are generated by hypocycloid curves.The curve is formed by the locus of a point, attached to a circle, that rolls on the inside of another circle. In the curve's equation the first part denotes the relative position between the two circles, the second part denotes the rotation of the rolling circle.

Code here