- Joined
- Mar 7, 2011
- Messages
- 124
I want to get an evenly weighted, random point in an angled rectangle. I was wondering if there are any libraries for shapes, particularly rectangles, available that can do that? Even better if it can also detect points being inside a rectangle. I don't have any big preference for how it defines rectangles internally. I don't think sampling random points and then rejecting ones outside the rectangle will work for performance reasons, but I could be overestimating things
The only thing I've found is Outside/Inside Polygon Detection System [Nhoek System] - Wc3C.net which might work, but I don't fully understand how it's implemented and the parts I do get make me a bit worried about how it'll do dynamically creating shapes. More importantly, I'm also not sure how I'd extend it's structure properly for my needs
The only thing I've found is Outside/Inside Polygon Detection System [Nhoek System] - Wc3C.net which might work, but I don't fully understand how it's implemented and the parts I do get make me a bit worried about how it'll do dynamically creating shapes. More importantly, I'm also not sure how I'd extend it's structure properly for my needs
Last edited: