Both cardioids and limacons are generated by choosing and following a point on or within a circle as it rolls around the outside of another circle of equal radius, making them part of a family of curves known as centered trochoids. In turn, centered trochoids can be grouped with all roulettes, or shapes generated by one curve rolling around another. As the name "centered" implies, centered trochoids are generated when both curves are circles.
Limacons can be dimpled, with a cusp, looped or convex. This depends on where on the rolling circle you choose your point. From a mathematical point of view, these variations can be seen by varying the coefficients "a" and "b" in the general limacon equation (in polar coordinates): r = a + b cos(theta). Though you can also write this in Cartesian coordinates, the resulting formula is much less elegant: x^2 + y^2 - ax)^2 = b^2(x^2 + y^2).
To generate a cardioid as opposed to other types of limacons, you must choose a point that is on the circumference of the rolling circle. The cardioid is a special case of limacon in which the limacon shape has a cusp, or point, rather than a dimple or a loop. Mathematically, this is achieved by setting a = b, so that the formula could also be rewritten: r = b (1 + cos(theta)) = 2b cos^2(theta / 2).
In addition to rolling a circle outside another circle, you can also generate limacons and the special case, cardioids, by rolling a smaller circle inside a larger one. The radius of the smaller circle must be exactly half that of the larger circle. This makes limacons different from other centered trochoids in that other centered trochoids may have any ratio of inner to outer radius. When you view limacons this way, as a small circle rolling around inside a larger one, you can use the mental image as a good memory tip to recall why this whole class of shapes is known as "roulettes": The image is reminiscent of the gambling device known as a roulette wheel.