n = 7 (slider from 2 to 20, step 1)
Figurenfolge = Sequence(Polygon[(0, 1), ((((cos(((k * 2) * π / n)) - cos(π / n)) * sin(π / n)) * 2), (((sin(((k * 2) * π / n)) - sin(π / n)) * sin(π / n)) * 2) + 1), n], k, 1, n)
Kardioide = CurveCartesian((2 * sin(t)) + sin((2 * t)), (-((2 * cos(t)) + cos((2 * t)))), t, 0, (2 * π))