Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

#1: Initial revision by user avatar tommi‭ · 2023-08-26T19:33:55Z (over 1 year ago)
A (regular, convex and some weaker condition would be sufficient) polygon is a finite union of triangles with one vertex at the origin, and which only meet at their edges. (I am being ambiguous whether I consider the triangles as closed or open, but this almost surely does not make a difference.)

In case of a regular polygon, the two sides that touch the origin are equally long, even, and in the case presented in the question this side length is one and all the triangles are congruent.

That is to say, the question reduces to finding a uniformly random point in a triangle, or maybe even a triangle with extra properties. For an isosceles triangle with height h, we can choose a random height from a linear distribution that has value zero at the origin and a known value (that is uniquely determined by linearity and the total probability being one) at the wide end, and then consider a uniform distribution at the selected height.

(Bedtime and this response is CC-zero licensed, so details can be added by anyone.)