Polygon Decompositions
Version 12 introduces PolygonDecomposition to decompose polygons into a union of simpler polygons, including triangles and simple and convex polygons. It is applied in several areas, including computational geometry, pattern recognition, image processing and computer graphics.
Solve the art gallery problem: guard an art gallery with the minimum number of guards who together can observe the whole gallery. First generate a simple polygon from the gallery floor plan.
Decompose the floor plan into triangles.
Build a visibility graph from the polygon decomposition.
Find the dominant set of the graph.
show complete Wolfram Language input
Select guards with minimum colors and display their positions.