Thanks for the location for posting thoughts on that! Also huge thanks on the idea of the Delaunay Triangulation. I was able to make an algorithm for creating a 500 point mesh with 1 point in each corner (to leave no gaps) and the rest randomized and implemented the triangulation and now I have a solid white screen of triangles and have them added to a list as they generate so that each triangle can be interacted with independently. You have been of amazing assistance. -Tairros
Tairros
Posts
-
Python - Pygame - Fill screen with triangles without gaps -
Python - Pygame - Fill screen with triangles without gapsI am new to this page and am hoping I have this in the right place. I am using python combined with pygame to try and generate a screen that is full of random triangles that completely fill the screen with no gaps while each triangle has random length of sides. So it would be partially random while also taking into account the remaining spaces when generating so that it leaves no space uncovered but no overlapping either. IE. Black background and white triangles, the screen actually consists of 100 triangles but because they are all white the screen just looks solid white. I originally tried to do this with random vertices and trying to connect the sides but that was... messy to say the least and didn't play nice. Does anyone know any path I could look into for figuring this out? I'm not looking for full code of having someone do it for me, I just need to figure this out and get an idea on either a method I'm not thinking of or some math I can look at for generation. Forgive the long winded explanation.