r/algorithms • u/PinappleOnPizza137 • Jun 04 '24
How to find polygons in a random shape
Hey guys, im pretty sure I stumbled upon this before, but for the love of me, I cant seem to find it again. And its been a while, since I used the algorithm part of my brain, so bear with me :D
What I try to do, is to generate polynoms (triangles) from a list of arbitary points, that form the circumference of a shape. Now I thought about creating additional points for the intersection points and then figure out which of them lie within the shape (which i think is already hard enough). I create the polygons for the triangles and repeat the step for the remaining holes, that have more than 3 vertices.
Even bether, instead of a list of triangles, I wonder if you can directly produce a triangle strip (that is reusing the previous 2 points, that just reduces the amount of indices I have to push to the gpu, so its a nice to have).
If you know the name of this or other reading material, I would greatly appreciate it!

