I'm extremely new to Python and trying to figure out the most efficient way to randomly select a point within a polygon. The image I attached is representative of the scenario - my first attempt took nearly 30 seconds to generate a list of all pixel (x,y) coordinates contained in the gray area (I think I used matplotlib).
Based on other similar questions and suggestions I saw here, I am currently generating a rough bounding box of the polygon, setting min(x) and min(y) values based on the bounding box, and running a series of checks to see if I've landed in a valid area. Should I bother trying to generate a precise valid point list or is "dump and test" going to be faster?