Hypocycloid is a special kind of hypotrochoid. Hypocycloid is a special plane curve generated by the trace of a fixed point on a small circle that rolls within a larger circle. It is comparable to the cycloid but instead of the circle rolling along a line, it rolls within a circle.
If the smaller circle has radius r, and the larger circle has radius R = kr, then the parametric equations for the curve 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 then the curve has p cusps (where k = p/q), 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.
To draw function Hypocycloid use the folowing script: