The simple (non self-intersecting) polygons, and the area calculation, appear to work in (nearly) all cases, but there are still some issues with generating the polygrams. Cases like 9,6 and 12,4 are generated by more than 2 triangles or squares, which I did not deal with yet. More to do when I have time...

It looks like the number of polygons required to generate a polygram is the largest coprime of the number of vertices (p) and the next vertex value (q).

EDIT: Some of the polygrams get pretty weird, 15,6 for example is composed of 3 pentagrams. I abandoned my functional approach, and made a class with linked nodes and segments, and a visited property to traverse the nodes. It now works for all cases.

BTW, p,1 approaches Bart's solution with increasing p