Polygons (d3-polygon)
Geometric operations for two-dimensional polygons.对二维多边形进行几何运算。
- d3.polygonArea - compute the area of the given polygon.计算给定多边形的面积。
- d3.polygonCentroid - compute the centroid of the given polygon.计算给定多边形的质心。
- d3.polygonHull - compute the convex hull of the given points.计算给定点的凸包
- d3.polygonContains - test whether a point is inside a polygon.测试一个点是否在一个多边形内
- d3.polygonLength - compute the length of the given polygon’s perimeter.计算给定多边形周长的长度。