2021
05-20
05-20
python 实现德洛内三角剖分的操作
我也不知道这玩意主要是干啥用的实现如下我用剖分的三角形的三个顶点到中心点的距离和作为颜色,结果显示:点越密集的地方,图片上的颜色越深。fromscipy.spatialimportDelaunayimportnumpyasnpimportmatplotlib.pyplotaspltwidth=80height=40pointNumber=50points=np.zeros((pointNumber,2))points[:,0]=np.random.randint(0,width,pointNumber)points[:,1]=np.random.randint(0,height,pointN...
继续阅读 >