How to represent a polygon with hole(s)?

前端 未结 6 1888
野趣味
野趣味 2021-01-02 10:17

It\'s usually popular to work with polygons with their vertices sorted CW or CCW in vectors(2*1 or 1*2 matrices). However, how to state polygons with holes in vectors?

6条回答
  •  北荒
    北荒 (楼主)
    2021-01-02 11:11

    You can break a polygon with a hole in it into two shapes without a hole. When you're doing contour integration in a complex plane, you can create a "cut" from one edge of the polygon that brings you to the edge of the hole; integrate around one side of the hole and back; then traverse around the other side for the second polygon. You end up with two path integrals along each cut that cancel each other out.

    "visibility graph" - is this for a radiation view factor calculation with shading? Or a ray-tracing graphics algorithm?

提交回复
热议问题