• Как определить наличие точки внутри полигона?

    @AlphaSomeone
    Можно через pillow. Как-то так:
    import pygame, PIL.Image
    pygame.init()
    
    def collidepointInPolygon(point_pos, polygon_pos):
        start = time.time()
        a = pygame.Surface(size=(point_pos[0] + 1, point_pos[1] + 1))
        a.fill((0, 0, 0))
        pygame.draw.polygon(a, (255, 255, 255), polygon_pos)
        a = pygame.image.tostring(a, "RGB")
        a = PIL.Image.frombytes("RGB", (point_pos[0] + 1, point_pos[1] + 1), a)
        a = a.getpixel((point_pos[0], point_pos[1])) == (255, 255, 255)
        
        return a
    
    collidepointInPolygon([0, 0], [[100, 100], [200, 200], [200, 100]])