This is a thing I wrote to find the simplest polygon that is within an arc, but not outside it. It is supposed to be used in snygg to show the playable area.
The code for finding these points boils down to finding the angle distance between the points on the outer radius (called sigma in the code):
wheregen_points is the following algorithm (change with the radio button above):