I have a 4 side convex Polygon defined by 4 points in 2D, and I want to be able to generate random points inside it.
If it really simplifies the problem, I can limit the polygon to a parallelogram, but a more general answer is preferred.
Generating random points until one is inside the polygon wouldn't work because it's really unpredictable the time it takes.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…