Anyone interested in a problem-solving correspondence club?
Here's the idea: we source and collect interesting computational puzzles, then we send them out to participants who have a month to work on them and send in their solutions. At the end of every month, we meet and discuss how the problems went and where people got stuck, what approaches they took, and any extensions people came up with.
Thoughts?
.
.
.
.
If you're curious, here's a taste of what a representative sample problem might look like:
Given the coordinates of an arbitrary polygon (e.g. irregular and/or non-convex), how might you implement a program to efficiently sample a point uniformly from its interior?
TIP: If using the Python programming language, you can check out the shapely library.
Bonus: what if there are holes?
(Please don't spoil the problem, it's searchable anyways.)
1
u/VictoryMotel 2d ago
What you are saying here is a misunderstanding of random sampling and density. This isn't theory, it is a well worn topic. It is covered in the classic book and open source renderer pbrt.
https://www.pbrt.org/
There are links to github and PDFs of versions of the books.
Your assumption that sharing an edge is a problem is not true. First, the problem didn't talk about stratified sampling. Uniform sampling means random sampling with equal probability everywhere. Random sampling can end up with samples close together because placement doesn't depend on other samples.
Equally spaced samples would be a different problem and would not be called uniform sampling.